diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-27 05:12:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-27 05:12:45 +0100 |
commit | 52410575be50d5c40bbe6380159df48cfc382ceb (patch) | |
tree | f8a212edd951fa1df961da74870bc9c172dc0b01 /src/ex_getln.c | |
parent | dfded98f87601b11271ee88392c821ceb6390eda (diff) | |
download | vim-git-52410575be50d5c40bbe6380159df48cfc382ceb.tar.gz |
patch 8.1.2225: the "last used" info of a buffer is under usedv8.1.2225
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 #4722)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 9c98f99ba..5cc1c3489 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1407,6 +1407,9 @@ getcmdline_int( */ if ((c == p_wc && !gotesc && KeyTyped) || c == p_wcm) { + int options = WILD_NO_BEEP; + if (wim_flags[wim_index] & WIM_BUFLASTUSED) + options |= WILD_BUFLASTUSED; if (xpc.xp_numfiles > 0) /* typed p_wc at least twice */ { /* if 'wildmode' contains "list" may still need to list */ @@ -1419,10 +1422,10 @@ getcmdline_int( did_wild_list = TRUE; } if (wim_flags[wim_index] & WIM_LONGEST) - res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP, + res = nextwild(&xpc, WILD_LONGEST, options, firstc != '@'); else if (wim_flags[wim_index] & WIM_FULL) - res = nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP, + res = nextwild(&xpc, WILD_NEXT, options, firstc != '@'); else res = OK; /* don't insert 'wildchar' now */ @@ -1434,10 +1437,10 @@ getcmdline_int( /* if 'wildmode' first contains "longest", get longest * common part */ if (wim_flags[0] & WIM_LONGEST) - res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP, + res = nextwild(&xpc, WILD_LONGEST, options, firstc != '@'); else - res = nextwild(&xpc, WILD_EXPAND_KEEP, WILD_NO_BEEP, + res = nextwild(&xpc, WILD_EXPAND_KEEP, options, firstc != '@'); /* if interrupted while completing, behave like it failed */ @@ -1488,10 +1491,10 @@ getcmdline_int( redrawcmd(); did_wild_list = TRUE; if (wim_flags[wim_index] & WIM_LONGEST) - nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP, + nextwild(&xpc, WILD_LONGEST, options, firstc != '@'); else if (wim_flags[wim_index] & WIM_FULL) - nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP, + nextwild(&xpc, WILD_NEXT, options, firstc != '@'); } else |