From e2b08d27bfa83d551466d7289549a6653c74e3fa Mon Sep 17 00:00:00 2001 From: haya14busa Date: Fri, 21 Feb 2014 16:30:25 +0900 Subject: [PATCH] Fix changelist is modified unexpectedly Problem: changelist is modified by setline() Solution: Use :h keepjumps It seems work as changelist not only jumplist close #114 Thanks for the report @wilywampa --- autoload/EasyMotion.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index f902c64..6a0e0a9 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -3,7 +3,7 @@ " Author: Kim Silkebækken " haya14busa " Source: https://github.com/Lokaltog/vim-easymotion -" Last Change: 20 Feb 2014. +" Last Change: 21 Feb 2014. "============================================================================= " Saving 'cpoptions' {{{ scriptencoding utf-8 @@ -399,7 +399,7 @@ endfunction "}}} " -- Draw -------------------------------- function! s:SetLines(lines, key) " {{{ for [line_num, line] in a:lines - call setline(line_num, line[a:key]) + keepjumps call setline(line_num, line[a:key]) endfor endfunction " }}} " -- Get characters from user input ------ @@ -1004,11 +1004,11 @@ function! s:PromptUser(groups) "{{{ " Break undo history (undobreak) let old_undolevels = &undolevels set undolevels=-1 - call setline('.', getline('.')) + keepjumps call setline('.', getline('.')) let &undolevels = old_undolevels unlet old_undolevels " FIXME: Error occur by GundoToggle for undo number 2 is empty - call setline('.', getline('.')) + keepjumps call setline('.', getline('.')) endif "}}} redraw