aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-08-11 18:58:26 -0400
committerGitHub <noreply@github.com>2016-08-11 18:58:26 -0400
commita1682281f427ab011930f421e5691cf4bf230df1 (patch)
treebea2bfef53af6182fce4437a3f82ddf2e46879de /src
parent8c4c366a9ebeff6c549f85316cbc8838fcfae56a (diff)
parent6aefd14482fe58d4c056bd8e1e1651640387a36e (diff)
downloadrneovim-a1682281f427ab011930f421e5691cf4bf230df1.tar.gz
rneovim-a1682281f427ab011930f421e5691cf4bf230df1.tar.bz2
rneovim-a1682281f427ab011930f421e5691cf4bf230df1.zip
Merge #5214 from jamessan/browse-modifier
Re-add ":browse" command modifier and use it with ":oldfiles"
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c4
-rw-r--r--src/nvim/ex_cmds_defs.h31
-rw-r--r--src/nvim/ex_docmd.c3
3 files changed, 19 insertions, 19 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();
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h
index f46d1e6d47..421c14b495 100644
--- a/src/nvim/ex_cmds_defs.h
+++ b/src/nvim/ex_cmds_defs.h
@@ -160,23 +160,22 @@ typedef struct expand {
#define XP_BS_ONE 1 /* uses one backslash before a space */
#define XP_BS_THREE 2 /* uses three backslashes before a space */
-/*
- * Command modifiers ":vertical", ":browse", ":confirm" and ":hide" set a flag.
- * This needs to be saved for recursive commands, put them in a structure for
- * easy manipulation.
- */
+/// Command modifiers ":vertical", ":browse", ":confirm", ":hide", etc. set a
+/// flag. This needs to be saved for recursive commands, put them in a
+/// structure for easy manipulation.
typedef struct {
- int hide; /* TRUE when ":hide" was used */
- int split; /* flags for win_split() */
- int tab; /* > 0 when ":tab" was used */
- int confirm; /* TRUE to invoke yes/no dialog */
- int keepalt; /* TRUE when ":keepalt" was used */
- int keepmarks; /* TRUE when ":keepmarks" was used */
- int keepjumps; /* TRUE when ":keepjumps" was used */
- int lockmarks; /* TRUE when ":lockmarks" was used */
- int keeppatterns; /* TRUE when ":keeppatterns" was used */
- bool noswapfile; /* true when ":noswapfile" was used */
- char_u *save_ei; /* saved value of 'eventignore' */
+ int hide; ///< TRUE when ":hide" was used
+ int split; ///< flags for win_split()
+ int tab; ///< > 0 when ":tab" was used
+ int confirm; ///< TRUE to invoke yes/no dialog
+ int keepalt; ///< TRUE when ":keepalt" was used
+ int keepmarks; ///< TRUE when ":keepmarks" was used
+ int keepjumps; ///< TRUE when ":keepjumps" was used
+ int lockmarks; ///< TRUE when ":lockmarks" was used
+ int keeppatterns; ///< TRUE when ":keeppatterns" was used
+ bool noswapfile; ///< true when ":noswapfile" was used
+ bool browse; ///< TRUE to invoke file dialog
+ char_u *save_ei; ///< saved value of 'eventignore'
} cmdmod_T;
#endif // NVIM_EX_CMDS_DEFS_H
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 8bae817211..1e54f03ba0 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1313,8 +1313,9 @@ static char_u * do_one_cmd(char_u **cmdlinep,
case 'b': if (checkforcmd(&ea.cmd, "belowright", 3)) {
cmdmod.split |= WSP_BELOW;
continue;
- }
+ }
if (checkforcmd(&ea.cmd, "browse", 3)) {
+ cmdmod.browse = true;
continue;
}
if (!checkforcmd(&ea.cmd, "botright", 2))