aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-11-15 00:10:39 +0100
committerJustin M. Keyes <justinkz@gmail.com>2016-11-15 04:22:24 +0100
commit3f7a2d785dcc8c3dad341669c83f29779987d9a4 (patch)
treeea4f1e8e75a81a01c0807c61721d93531251b695 /src/nvim/ex_docmd.c
parent708617ebb6aa9f078549646930c73f0755c2c2e6 (diff)
downloadrneovim-3f7a2d785dcc8c3dad341669c83f29779987d9a4.tar.gz
rneovim-3f7a2d785dcc8c3dad341669c83f29779987d9a4.tar.bz2
rneovim-3f7a2d785dcc8c3dad341669c83f29779987d9a4.zip
'inccommand': Introduce CMDPREVIEW state.
Command "live preview" is fundamentally a non-recursive concept ("preview of a preview" is not useful). Maintaining this as a global is less awkward and closer to what we actually want to express, vs adorning exarg_T, CommandLineState, etc.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 07e0fa8844..76dddf874d 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1248,7 +1248,6 @@ static char_u * do_one_cmd(char_u **cmdlinep,
memset(&ea, 0, sizeof(ea));
ea.line1 = 1;
ea.line2 = 1;
- ea.is_live = flags & DOCMD_LIVE;
ex_nesting_level++;
/* When the last file has not been edited :q has to be typed twice. */
@@ -9648,12 +9647,12 @@ static void ex_terminal(exarg_T *eap)
}
}
-/// Check whether commandline starts with a live command
+/// Checks if `cmd` is "previewable" (i.e. supported by 'inccommand').
///
/// @param[in] cmd Commandline to check. May start with a range.
///
-/// @return True if first command is a live command
-bool cmd_is_live(char_u *cmd)
+/// @return true if `cmd` is previewable
+bool cmd_can_preview(char_u *cmd)
{
if (cmd == NULL) {
return false;