Fix #2330 - Do not use getcurpos() to avoid changing curswant

This commit is contained in:
w0rp
2019-03-07 12:28:36 +00:00
parent 6aef52f026
commit 5505f2323d
11 changed files with 19 additions and 19 deletions

View File

@@ -22,7 +22,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort
let l:shortmess_options = &l:shortmess
try
let l:cursor_position = getcurpos()
let l:cursor_position = getpos('.')
" The message is truncated and saved to the history.
setlocal shortmess+=T
@@ -44,7 +44,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort
" Reset the cursor position if we moved off the end of the line.
" Using :norm and :echomsg can move the cursor off the end of the
" line.
if l:cursor_position != getcurpos()
if l:cursor_position != getpos('.')
call setpos('.', l:cursor_position)
endif
finally
@@ -114,7 +114,7 @@ function! ale#cursor#EchoCursorWarningWithDelay() abort
call s:StopCursorTimer()
let l:pos = getcurpos()[0:2]
let l:pos = getpos('.')[0:2]
" Check the current buffer, line, and column number against the last
" recorded position. If the position has actually changed, *then*