diff options
author | Jagua <jagualitol@gmail.com> | 2019-03-07 00:41:39 +0900 |
---|---|---|
committer | Jagua <jagualitol@gmail.com> | 2019-03-07 00:41:39 +0900 |
commit | b597d858785e933b00e1abc0f004be58cab24520 (patch) | |
tree | 97ac3e72a5dab188b38106b040ab478c43105d44 | |
parent | ffd98639c3a2444d84585397e42a985371a90358 (diff) | |
download | vim-sonictemplate-b597d858785e933b00e1abc0f004be58cab24520.tar.gz vim-sonictemplate-b597d858785e933b00e1abc0f004be58cab24520.tar.bz2 vim-sonictemplate-b597d858785e933b00e1abc0f004be58cab24520.zip |
Fix missing backslash escape
When writing in Go, type the following code,
```go
"AA\nBB".log
```
and hits `<C-y><C-b>`, then got the following result.
```go
log.Println("AA
BB")
```
but want this.
```go
log.Println("AA\nBB")
```
-rw-r--r-- | autoload/sonictemplate.vim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim index 2c68664..b1ff6a9 100644 --- a/autoload/sonictemplate.vim +++ b/autoload/sonictemplate.vim @@ -336,6 +336,7 @@ function! sonictemplate#postfix() return '' endif let line = getline('.')[:col('.')] + let line = escape(line, '\') for k in keys(s:pat[&ft]) let m = matchstr(line, k) if len(m) > 0 |