diff options
author | James McCoy <jamessan@jamessan.com> | 2016-08-11 09:35:17 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-08-11 13:37:42 -0400 |
commit | d0c0930acfeb8d6dc299a56d2c12cd0aa3fc960f (patch) | |
tree | 50c4f5100ef19bd2caaa583bb9d3e28e6c9e86b4 /src | |
parent | b805a7149580685edfcebcc96285e1bb96bb103d (diff) | |
download | rneovim-d0c0930acfeb8d6dc299a56d2c12cd0aa3fc960f.tar.gz rneovim-d0c0930acfeb8d6dc299a56d2c12cd0aa3fc960f.tar.bz2 rneovim-d0c0930acfeb8d6dc299a56d2c12cd0aa3fc960f.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |