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:
Jaehwang Jerry Jung
2020-02-19 13:52:10 +09:00
committed by GitHub
parent cbadb3d93e
commit c62e618a1a

View File

@@ -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