aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-21 14:07:50 -0700
committerGitHub <noreply@github.com>2019-09-21 14:07:50 -0700
commitfd82ce4a3a9c9833e07db079debf6c9b94a2cfd3 (patch)
tree30520e000a28c2b2099c641ce33826aea0c07541 /src/nvim/ex_docmd.c
parentb3e56957f8e9468497e5db508d97d7b560ccfe85 (diff)
parent111d34849a0670842b56c17c3922dbf0576bb39b (diff)
downloadrneovim-fd82ce4a3a9c9833e07db079debf6c9b94a2cfd3.tar.gz
rneovim-fd82ce4a3a9c9833e07db079debf6c9b94a2cfd3.tar.bz2
rneovim-fd82ce4a3a9c9833e07db079debf6c9b94a2cfd3.zip
Merge #11060 from janlazo/vim-8.1.1783
vim-patch:8.0.{1109,1529,1539,1621,1733,1771,1776},8.1.{1783,2054,2058}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 72d39adb3e..a6931f3acd 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -77,7 +77,7 @@
#include "nvim/api/private/helpers.h"
static int quitmore = 0;
-static int ex_pressedreturn = FALSE;
+static bool ex_pressedreturn = false;
/// Whether ":lcd" or ":tcd" was produced for a session.
static int did_lcd;
@@ -1278,14 +1278,14 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|| getline_equal(fgetline, cookie, getexline))
&& curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) {
ea.cmd = (char_u *)"+";
- ex_pressedreturn = TRUE;
+ ex_pressedreturn = true;
}
/* ignore comment and empty lines */
if (*ea.cmd == '"')
goto doend;
if (*ea.cmd == NUL) {
- ex_pressedreturn = TRUE;
+ ex_pressedreturn = true;
goto doend;
}
@@ -10131,6 +10131,17 @@ static void ex_folddo(exarg_T *eap)
ml_clearmarked(); // clear rest of the marks
}
+bool get_pressedreturn(void)
+ FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
+{
+ return ex_pressedreturn;
+}
+
+void set_pressedreturn(bool val)
+{
+ ex_pressedreturn = val;
+}
+
static void ex_terminal(exarg_T *eap)
{
char ex_cmd[1024];