Mercurial > vim
diff src/ex_getln.c @ 18463:18d7337b6837 v8.1.2225
patch 8.1.2225: the "last used" info of a buffer is under used
Commit: https://github.com/vim/vim/commit/52410575be50d5c40bbe6380159df48cfc382ceb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 27 05:12:45 2019 +0100
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 #4722)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 27 Oct 2019 05:15:06 +0100 |
parents | 71199e360948 |
children | fd95d4dbeb37 |
line wrap: on
line diff
--- 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