mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
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.
358308dd99
This commit is contained in:
@@ -919,7 +919,8 @@ end_do_tag:
|
|||||||
/* Only store the new index when using the tagstack and it's valid. */
|
/* Only store the new index when using the tagstack and it's valid. */
|
||||||
if (use_tagstack && tagstackidx <= curwin->w_tagstacklen)
|
if (use_tagstack && tagstackidx <= curwin->w_tagstacklen)
|
||||||
curwin->w_tagstackidx = tagstackidx;
|
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;
|
return jumped_to_tag;
|
||||||
}
|
}
|
||||||
|
@@ -95,8 +95,17 @@ function RunTheTest(test)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Close any extra windows and make the current one not modified.
|
" 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!
|
bwipe!
|
||||||
|
if wincount == winnr('$')
|
||||||
|
" Did not manage to close a window.
|
||||||
|
only!
|
||||||
|
break
|
||||||
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
set nomodified
|
set nomodified
|
||||||
endfunc
|
endfunc
|
||||||
|
@@ -7,4 +7,20 @@ func Test_ptag_with_notagstack()
|
|||||||
set tagstack&vim
|
set tagstack&vim
|
||||||
endfunc
|
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\<CR>\<CR>", "xt")
|
||||||
|
help
|
||||||
|
call assert_equal(2, winnr('$'))
|
||||||
|
|
||||||
|
call delete('Xtags')
|
||||||
|
quit
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -193,7 +193,7 @@ static int included_patches[] = {
|
|||||||
2251,
|
2251,
|
||||||
// 2250,
|
// 2250,
|
||||||
2249,
|
2249,
|
||||||
// 2248,
|
2248,
|
||||||
// 2247 NA
|
// 2247 NA
|
||||||
// 2246,
|
// 2246,
|
||||||
// 2245,
|
// 2245,
|
||||||
|
Reference in New Issue
Block a user