From d9c33fdd32615c2236713cfb83241107fe28e767 Mon Sep 17 00:00:00 2001 From: YggdrasiI Date: Tue, 9 Feb 2016 20:06:23 +0100 Subject: [PATCH] Remove option g:EasyMotion_maximal_jumpmarks. --- autoload/EasyMotion.vim | 8 ++------ plugin/EasyMotion.vim | 1 - t/compare_movements_spec.vim | 2 ++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index e967c7a..713573c 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -1308,8 +1308,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{ " but in this case, it's better to allows jump side effect " to gathering matched targets coordinates. let pos = searchpos(regexp, search_direction . (config.accept_cursor_pos ? 'c' : ''), search_stopline) - let num_jumpmarks = 0 - while l:num_jumpmarks < g:EasyMotion_maximal_jumpmarks + while 1 " Reached end of search range if pos == [0, 0] break @@ -1328,7 +1327,6 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{ endif "}}} let pos = searchpos(regexp, search_direction, search_stopline) - let l:num_jumpmarks += 1 endwhile "}}} @@ -1346,17 +1344,15 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{ keepjumps call cursor(s:current.cursor_position[0], \ s:current.cursor_position[1]) - let l:num_jumpmarks = 0 let targets2 = [] if s:flag.within_line == 0 let search_stopline = win_first_line else let search_stopline = s:current.cursor_position[0] endif - while l:num_jumpmarks < g:EasyMotion_maximal_jumpmarks + while 1 " TODO: refactoring let pos = searchpos(regexp, 'b', search_stopline) - let l:num_jumpmarks += 1 " Reached end of search range if pos == [0, 0] break diff --git a/plugin/EasyMotion.vim b/plugin/EasyMotion.vim index f9c7b49..ade2b41 100644 --- a/plugin/EasyMotion.vim +++ b/plugin/EasyMotion.vim @@ -51,7 +51,6 @@ let g:EasyMotion_command_line_key_mappings = \ get(g: , 'EasyMotion_command_line_key_mappings' , {}) let g:EasyMotion_disable_two_key_combo = \ get(g: , 'EasyMotion_disable_two_key_combo' , 0) -let g:EasyMotion_maximal_jumpmarks = get(g: , 'EasyMotion_maximal_jumpmarks' , 999) "}}} diff --git a/t/compare_movements_spec.vim b/t/compare_movements_spec.vim index d7d52d3..6a0bfa0 100644 --- a/t/compare_movements_spec.vim +++ b/t/compare_movements_spec.vim @@ -201,8 +201,10 @@ describe 'Keyword word motion' end it 'Simple test to check setup of this test' + " Check if a is remapped to to avoid start of insert mode. normal aa\ Expect getline(1) == '' + call AddLine('word') Expect CompareMovements('w', 'w', 0) == 0 Expect CompareMovements('w', '\wa', 0) == 0