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().
8ad80dea08
This commit is contained in:
Jan Edmund Lazo
2018-06-21 09:59:14 -04:00
parent 7ae7da8fb9
commit bf61885cb4
7 changed files with 124 additions and 37 deletions

View File

@@ -17,6 +17,15 @@ enum getf_values {
GETF_SWITCH = 0x04, // respect 'switchbuf' settings when jumping
};
// Return values of getfile()
enum getf_retvalues {
GETFILE_ERROR = 1, // normal error
GETFILE_NOT_WRITTEN = 2, // "not written" error
GETFILE_SAME_FILE = 0, // success, same file
GETFILE_OPEN_OTHER = -1, // success, opened another file
GETFILE_UNUSED = 8
};
// Values for buflist_new() flags
enum bln_values {
BLN_CURBUF = 1, // May re-use curbuf for new buffer