mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 18:03:46 -05:00
Make insert independent of whichwrap setting (#419)
If `set whichwrap+=l`, `normal! l` may move the cursor to the next line.
Use `feedkeys('a', 'ni')` instead.
This commit is contained in:
committed by
GitHub
parent
cbadb3d93e
commit
c62e618a1a
@@ -1507,7 +1507,6 @@ function s:PlaceDelimitersAndInsBetween()
|
|||||||
else
|
else
|
||||||
execute ':normal! ' . insOrApp . left
|
execute ':normal! ' . insOrApp . left
|
||||||
endif
|
endif
|
||||||
silent! normal! l
|
|
||||||
|
|
||||||
"if needed convert spaces back to tabs and adjust the cursors col
|
"if needed convert spaces back to tabs and adjust the cursors col
|
||||||
"accordingly
|
"accordingly
|
||||||
@@ -1520,7 +1519,7 @@ function s:PlaceDelimitersAndInsBetween()
|
|||||||
if isDelimOnEOL && lenRight ==# 0
|
if isDelimOnEOL && lenRight ==# 0
|
||||||
startinsert!
|
startinsert!
|
||||||
else
|
else
|
||||||
startinsert
|
call feedkeys('a', 'ni')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user