From d0c0930acfeb8d6dc299a56d2c12cd0aa3fc960f Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 11 Aug 2016 09:35:17 -0400 Subject: Restore ":browse oldfiles" behavior from Vim In 3b12bb225adda2aac40a55f7009cae05311b2a43, ":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. --- src/nvim/eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 38aa587d37..f6545a5ca9 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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(); -- cgit