mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28:17 +00:00
Restore ":browse oldfiles" behavior from Vim
In 3b12bb225a
, ":oldfiles" was taught to
behave like Vim's ":browse oldfiles" if ":oldfiles!" was used. However,
this conflates the use of ! for abandoning a modified buffer with
choosing one file out of a list of oldfiles.
Now that ":browse" is supported again, ":browse oldfiles" will allow the
user to select an old file, while still complaining if that would cause
a modified buffer to be abandoned. ":browse oldfiles!" will just
abandon the buffer, as expected.
This commit is contained in:
@@ -21722,8 +21722,8 @@ void ex_oldfiles(exarg_T *eap)
|
||||
/* Assume "got_int" was set to truncate the listing. */
|
||||
got_int = FALSE;
|
||||
|
||||
// File selection prompt on ":oldfiles!"
|
||||
if (eap->forceit) {
|
||||
// File selection prompt on ":browse oldfiles"
|
||||
if (cmdmod.browse) {
|
||||
quit_more = false;
|
||||
nr = prompt_for_number(false);
|
||||
msg_starthere();
|
||||
|
Reference in New Issue
Block a user