mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00:00
vim-patch:7.4.1956
Problem: When using CTRL-W f and pressing "q" at the ATTENTION dialog the
newly opened window is not closed.
Solution: Close the window and go back to the original one. (Norio Takagi,
Hirohito Higashi)
5d2ca04029
This commit is contained in:
@@ -385,12 +385,16 @@ wingotofile:
|
||||
|
||||
ptr = grab_file_name(Prenum1, &lnum);
|
||||
if (ptr != NULL) {
|
||||
tabpage_T *oldtab = curtab;
|
||||
win_T *oldwin = curwin;
|
||||
setpcmark();
|
||||
if (win_split(0, 0) == OK) {
|
||||
RESET_BINDING(curwin);
|
||||
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
|
||||
ECMD_HIDE, NULL);
|
||||
if (nchar == 'F' && lnum >= 0) {
|
||||
if (do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL, ECMD_HIDE, NULL) == FAIL) {
|
||||
// Failed to open the file, close the window opened for it.
|
||||
win_close(curwin, false);
|
||||
goto_tabpage_win(oldtab, oldwin);
|
||||
} else if (nchar == 'F' && lnum >= 0) {
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
check_cursor_lnum();
|
||||
beginline(BL_SOL | BL_FIX);
|
||||
|
Reference in New Issue
Block a user