Allow newlines in closing (but not opening) of replacement
This commit is contained in:
parent
f97446abd1
commit
d12310f483
@ -383,7 +383,7 @@ function! s:wrap(string,char,type,...)
|
|||||||
let before = before . "\n\t"
|
let before = before . "\n\t"
|
||||||
endif
|
endif
|
||||||
if type ==# "v"
|
if type ==# "v"
|
||||||
let after = "\n" . initspaces . after
|
let after = "\n". after
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -422,6 +422,8 @@ function! s:wrap(string,char,type,...)
|
|||||||
let before = newchar
|
let before = newchar
|
||||||
let after = newchar
|
let after = newchar
|
||||||
endif
|
endif
|
||||||
|
"let before = substitute(before,'\n','\n'.initspaces,'g')
|
||||||
|
let after = substitute(after ,'\n','\n'.initspaces,'g')
|
||||||
if type ==# 'V' || (special && type ==# "v")
|
if type ==# 'V' || (special && type ==# "v")
|
||||||
let before = substitute(before,' \+$','','')
|
let before = substitute(before,' \+$','','')
|
||||||
let after = substitute(after ,'^ \+','','')
|
let after = substitute(after ,'^ \+','','')
|
||||||
@ -503,6 +505,7 @@ function! s:insert(...) " {{{1
|
|||||||
endif
|
endif
|
||||||
call search('\r','bW')
|
call search('\r','bW')
|
||||||
return "\<Del>"
|
return "\<Del>"
|
||||||
|
" Old implementation follows
|
||||||
let @@ = reg_save
|
let @@ = reg_save
|
||||||
"let text = s:wrap("\r",char,0)
|
"let text = s:wrap("\r",char,0)
|
||||||
"call inputrestore()
|
"call inputrestore()
|
||||||
|
Loading…
Reference in New Issue
Block a user