Fix shift in csw, etc.
This commit is contained in:
parent
5f32b8921e
commit
e9ba54ce8d
@ -424,10 +424,6 @@ function! s:dosurround(...) " {{{1
|
|||||||
exe 'norm '.strcount.'[/d'.strcount.']/'
|
exe 'norm '.strcount.'[/d'.strcount.']/'
|
||||||
else
|
else
|
||||||
exe 'norm d'.strcount.'i'.char
|
exe 'norm d'.strcount.'i'.char
|
||||||
" One character backwards
|
|
||||||
if getreg('"') != ""
|
|
||||||
call search('.','bW')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
let keeper = getreg('"')
|
let keeper = getreg('"')
|
||||||
let okeeper = keeper " for reindent below
|
let okeeper = keeper " for reindent below
|
||||||
@ -444,13 +440,15 @@ function! s:dosurround(...) " {{{1
|
|||||||
" Do nothing
|
" Do nothing
|
||||||
call setreg('"','')
|
call setreg('"','')
|
||||||
elseif char =~ "[\"'`]"
|
elseif char =~ "[\"'`]"
|
||||||
exe "norm! a \<Esc>d2i".char
|
exe "norm! i \<Esc>d2i".char
|
||||||
call setreg('"',substitute(getreg('"'),' ','',''))
|
call setreg('"',substitute(getreg('"'),' ','',''))
|
||||||
elseif char == '/'
|
elseif char == '/'
|
||||||
norm! "_x
|
norm! "_x
|
||||||
call setreg('"','/**/',"c")
|
call setreg('"','/**/',"c")
|
||||||
let keeper = substitute(substitute(keeper,'^/\*\s\=','',''),'\s\=\*$','','')
|
let keeper = substitute(substitute(keeper,'^/\*\s\=','',''),'\s\=\*$','','')
|
||||||
else
|
else
|
||||||
|
" One character backwards
|
||||||
|
call search('.','bW')
|
||||||
exe "norm da".char
|
exe "norm da".char
|
||||||
endif
|
endif
|
||||||
let removed = getreg('"')
|
let removed = getreg('"')
|
||||||
|
Loading…
Reference in New Issue
Block a user