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:
James McCoy
2016-08-11 09:35:17 -04:00
parent b805a71495
commit d0c0930acf
4 changed files with 5 additions and 7 deletions

View File

@@ -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();