From 700e13da82bde402bd0387917574efe6754420f4 Mon Sep 17 00:00:00 2001 From: lonerover Date: Tue, 14 Mar 2017 16:58:13 +0800 Subject: vim-patch:7.4.2228 Problem: Test files have inconsistant modelines. Solution: Don't set 'tabstop' to 2, use 'sts' and 'sw'. https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e --- src/nvim/testdir/test_digraph.vim | 2 +- src/nvim/testdir/test_gn.vim | 2 +- src/nvim/testdir/test_help_tagjump.vim | 2 +- src/nvim/testdir/test_increment.vim | 2 +- src/nvim/testdir/test_increment_dbcs.vim | 2 +- src/nvim/testdir/test_match.vim | 2 +- src/nvim/testdir/test_tagjump.vim | 3 ++- src/nvim/testdir/test_timers.vim | 3 ++- src/nvim/testdir/test_window_cmd.vim | 2 +- src/nvim/version.c | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim index 95500853f2..6290680305 100644 --- a/src/nvim/testdir/test_digraph.vim +++ b/src/nvim/testdir/test_digraph.vim @@ -458,4 +458,4 @@ func! Test_digraph_cmndline() call assert_equal("€", s) endfunc -" vim: tabstop=2 shiftwidth=0 sts=-1 expandtab +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_gn.vim b/src/nvim/testdir/test_gn.vim index 3eca99bd99..7a5cdabaa3 100644 --- a/src/nvim/testdir/test_gn.vim +++ b/src/nvim/testdir/test_gn.vim @@ -90,4 +90,4 @@ func Test_gn_command() sil! %d _ endfu -" vim: tabstop=2 shiftwidth=0 expandtab +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_help_tagjump.vim b/src/nvim/testdir/test_help_tagjump.vim index cc1c81c7f6..aabfe40537 100644 --- a/src/nvim/testdir/test_help_tagjump.vim +++ b/src/nvim/testdir/test_help_tagjump.vim @@ -162,4 +162,4 @@ func Test_help_complete() endtry endfunc -" vim: et sw=2: +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim index e53b569716..8bfd95d810 100644 --- a/src/nvim/testdir/test_increment.vim +++ b/src/nvim/testdir/test_increment.vim @@ -757,4 +757,4 @@ func Test_normal_increment_03() endfunc -" vim: tabstop=2 shiftwidth=2 expandtab +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_increment_dbcs.vim b/src/nvim/testdir/test_increment_dbcs.vim index ee286a0a24..474a16feeb 100644 --- a/src/nvim/testdir/test_increment_dbcs.vim +++ b/src/nvim/testdir/test_increment_dbcs.vim @@ -26,4 +26,4 @@ func Test_increment_dbcs_1() call assert_equal([0, 1, 13, 0], getpos('.')) endfunc -" vim: shiftwidth=2 expandtab +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_match.vim b/src/nvim/testdir/test_match.vim index 7748dee87f..9398ef2f27 100644 --- a/src/nvim/testdir/test_match.vim +++ b/src/nvim/testdir/test_match.vim @@ -231,4 +231,4 @@ func Test_matchaddpos_using_negative_priority() set hlsearch& endfunc -" vim: et ts=2 sw=2 +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index d8a333f44c..b22bde8047 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -6,4 +6,5 @@ func Test_ptag_with_notagstack() call assert_fails('ptag does_not_exist_tag_name', 'E426') set tagstack&vim endfunc -" vim: sw=2 et + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim index d92cbe6897..56f9feef66 100644 --- a/src/nvim/testdir/test_timers.vim +++ b/src/nvim/testdir/test_timers.vim @@ -52,4 +52,5 @@ func Test_retain_partial() call garbagecollect() sleep 200m endfunc -" vim: ts=2 sw=0 et + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index b7f41a711b..569a78a0ed 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -67,4 +67,4 @@ function Test_window_cmd_wincmd_gf() augroup! test_window_cmd_wincmd_gf endfunc -" vim: sw=2 et +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/version.c b/src/nvim/version.c index 5b3a7398d5..4758e35f01 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -213,7 +213,7 @@ static int included_patches[] = { // 2231, 2230, // 2229, - // 2228, + 2228, 2227, 2226, 2225, -- cgit From b65d5ff11bb8e095e7687c3e39fd006ef498b5b9 Mon Sep 17 00:00:00 2001 From: lonerover Date: Tue, 14 Mar 2017 17:10:45 +0800 Subject: vim-patch:7.4.2248 Problem: When cancelling the :ptjump prompt a preview window is opened for a following command. Solution: Reset g_do_tagpreview. (Hirohito Higashi) Add a test. Avoid that the test runner gets stuck in trying to close a window. https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe --- src/nvim/tag.c | 3 ++- src/nvim/testdir/runtest.vim | 11 ++++++++++- src/nvim/testdir/test_tagjump.vim | 16 ++++++++++++++++ src/nvim/version.c | 2 +- 4 files changed, 29 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 59f4c1e968..2c70f396a1 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -919,7 +919,8 @@ end_do_tag: /* Only store the new index when using the tagstack and it's valid. */ if (use_tagstack && tagstackidx <= curwin->w_tagstacklen) curwin->w_tagstackidx = tagstackidx; - postponed_split = 0; /* don't split next time */ + postponed_split = 0; // don't split next time + g_do_tagpreview = 0; // don't do tag preview next time return jumped_to_tag; } diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 5299fec7c2..0403a53f9c 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -95,8 +95,17 @@ function RunTheTest(test) endif " Close any extra windows and make the current one not modified. - while winnr('$') > 1 + while 1 + let wincount = winnr('$') + if wincount == 1 + break + endif bwipe! + if wincount == winnr('$') + " Did not manage to close a window. + only! + break + endif endwhile set nomodified endfunc diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index b22bde8047..678ad0ada8 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -7,4 +7,20 @@ func Test_ptag_with_notagstack() set tagstack&vim endfunc +func Test_cancel_ptjump() + set tags=Xtags + call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", + \ "word\tfile1\tcmd1", + \ "word\tfile2\tcmd2"], + \ 'Xtags') + + only! + call feedkeys(":ptjump word\\", "xt") + help + call assert_equal(2, winnr('$')) + + call delete('Xtags') + quit +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/version.c b/src/nvim/version.c index 4758e35f01..ab3ccdab3d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -193,7 +193,7 @@ static int included_patches[] = { 2251, // 2250, 2249, - // 2248, + 2248, // 2247 NA // 2246, // 2245, -- cgit