mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
vim-patch:8.1.2225: the "last used" info of a buffer is under used
Problem: The "last used" info of a buffer is under used.
Solution: Add "lastused" to getbufinfo(). List buffers sorted by last-used
field. (Andi Massimino, closes vim/vim#4722)
52410575be
This commit is contained in:
@@ -947,6 +947,10 @@ static int command_line_execute(VimState *state, int key)
|
||||
// - wildcard expansion is only done when the 'wildchar' key is really
|
||||
// typed, not when it comes from a macro
|
||||
if ((s->c == p_wc && !s->gotesc && KeyTyped) || s->c == p_wcm) {
|
||||
int options = WILD_NO_BEEP;
|
||||
if (wim_flags[s->wim_index] & WIM_BUFLASTUSED) {
|
||||
options |= WILD_BUFLASTUSED;
|
||||
}
|
||||
if (s->xpc.xp_numfiles > 0) { // typed p_wc at least twice
|
||||
// if 'wildmode' contains "list" may still need to list
|
||||
if (s->xpc.xp_numfiles > 1
|
||||
@@ -960,11 +964,11 @@ static int command_line_execute(VimState *state, int key)
|
||||
}
|
||||
|
||||
if (wim_flags[s->wim_index] & WIM_LONGEST) {
|
||||
s->res = nextwild(&s->xpc, WILD_LONGEST, WILD_NO_BEEP,
|
||||
s->firstc != '@');
|
||||
s->res = nextwild(&s->xpc, WILD_LONGEST, options,
|
||||
s->firstc != '@');
|
||||
} else if (wim_flags[s->wim_index] & WIM_FULL) {
|
||||
s->res = nextwild(&s->xpc, WILD_NEXT, WILD_NO_BEEP,
|
||||
s->firstc != '@');
|
||||
s->res = nextwild(&s->xpc, WILD_NEXT, options,
|
||||
s->firstc != '@');
|
||||
} else {
|
||||
s->res = OK; // don't insert 'wildchar' now
|
||||
}
|
||||
@@ -975,11 +979,11 @@ static int command_line_execute(VimState *state, int key)
|
||||
// if 'wildmode' first contains "longest", get longest
|
||||
// common part
|
||||
if (wim_flags[0] & WIM_LONGEST) {
|
||||
s->res = nextwild(&s->xpc, WILD_LONGEST, WILD_NO_BEEP,
|
||||
s->firstc != '@');
|
||||
s->res = nextwild(&s->xpc, WILD_LONGEST, options,
|
||||
s->firstc != '@');
|
||||
} else {
|
||||
s->res = nextwild(&s->xpc, WILD_EXPAND_KEEP, WILD_NO_BEEP,
|
||||
s->firstc != '@');
|
||||
s->res = nextwild(&s->xpc, WILD_EXPAND_KEEP, options,
|
||||
s->firstc != '@');
|
||||
}
|
||||
|
||||
// if interrupted while completing, behave like it failed
|
||||
@@ -1016,11 +1020,11 @@ static int command_line_execute(VimState *state, int key)
|
||||
s->did_wild_list = true;
|
||||
|
||||
if (wim_flags[s->wim_index] & WIM_LONGEST) {
|
||||
nextwild(&s->xpc, WILD_LONGEST, WILD_NO_BEEP,
|
||||
s->firstc != '@');
|
||||
nextwild(&s->xpc, WILD_LONGEST, options,
|
||||
s->firstc != '@');
|
||||
} else if (wim_flags[s->wim_index] & WIM_FULL) {
|
||||
nextwild(&s->xpc, WILD_NEXT, WILD_NO_BEEP,
|
||||
s->firstc != '@');
|
||||
nextwild(&s->xpc, WILD_NEXT, options,
|
||||
s->firstc != '@');
|
||||
}
|
||||
} else {
|
||||
vim_beep(BO_WILD);
|
||||
|
Reference in New Issue
Block a user