diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-06-21 09:59:14 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-06-21 12:50:30 -0400 |
commit | bf61885cb45fcced4f5886f336460be4af8a8ba8 (patch) | |
tree | 2852806953323960e6bc74ce50203af6b9a8dff0 /src/nvim/buffer.c | |
parent | 7ae7da8fb9ab2e23ffc19000798ae27a2dee4e87 (diff) | |
download | rneovim-bf61885cb45fcced4f5886f336460be4af8a8ba8.tar.gz rneovim-bf61885cb45fcced4f5886f336460be4af8a8ba8.tar.bz2 rneovim-bf61885cb45fcced4f5886f336460be4af8a8ba8.zip |
vim-patch:8.0.0621: :stag does not respect 'switchbuf'
Problem: The ":stag" command does not respect 'switchbuf'.
Solution: Check 'switchbuf' for tag commands that may open a new window.
(Ingo Karkat, closes vim/vim#1681) Define macros for the return values
of getfile().
https://github.com/vim/vim/commit/8ad80dea089ffeb1a845199c013e9bb4be1cd22e
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index eb781b1be0..a113cbcd5f 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1901,10 +1901,10 @@ int buflist_getfile(int n, linenr_T lnum, int options, int forceit) } } - ++RedrawingDisabled; - if (getfile(buf->b_fnum, NULL, NULL, (options & GETF_SETMARK), - lnum, forceit) <= 0) { - --RedrawingDisabled; + RedrawingDisabled++; + if (GETFILE_SUCCESS(getfile(buf->b_fnum, NULL, NULL, + (options & GETF_SETMARK), lnum, forceit))) { + RedrawingDisabled--; /* cursor is at to BOL and w_cursor.lnum is checked due to getfile() */ if (!p_sol && col != 0) { @@ -1915,7 +1915,7 @@ int buflist_getfile(int n, linenr_T lnum, int options, int forceit) } return OK; } - --RedrawingDisabled; + RedrawingDisabled--; return FAIL; } |