aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-14 06:38:26 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-14 13:39:40 +0800
commit9093fbdd026f088d923fea374a96a8b01ca0df3a (patch)
treec7499162182654955099ca94e39b23a446f56f05 /src
parent49ba36becd0bbf1052802b846f418aee673b28a5 (diff)
downloadrneovim-9093fbdd026f088d923fea374a96a8b01ca0df3a.tar.gz
rneovim-9093fbdd026f088d923fea374a96a8b01ca0df3a.tar.bz2
rneovim-9093fbdd026f088d923fea374a96a8b01ca0df3a.zip
vim-patch:9.1.0573: ex: no implicit print for single addresses
Problem: ex: no implicit print for single addresses Solution: explicitly print even during single addresses, as requested by POSIX (Mohamed Akram) See the POSIX behaviour here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03 Section 6b closes: vim/vim#15230 https://github.com/vim/vim/commit/c25a7084e9ae1f78c28ddcbe1fa23374cfdf1e03 Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c3
-rw-r--r--src/nvim/getchar.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 2495b673e4..6fae8f091e 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2079,6 +2079,7 @@ static char *do_one_cmd(char **cmdlinep, int flags, cstack_T *cstack, LineGetter
if (ea.skip) { // skip this if inside :if
goto doend;
}
+ assert(errormsg == NULL);
errormsg = ex_range_without_command(&ea);
goto doend;
}
@@ -2431,7 +2432,7 @@ static char *ex_range_without_command(exarg_T *eap)
{
char *errormsg = NULL;
- if (*eap->cmd == '|' || (exmode_active && eap->line1 != eap->line2)) {
+ if (*eap->cmd == '|' || exmode_active) {
eap->cmdidx = CMD_print;
eap->argt = EX_RANGE | EX_COUNT | EX_TRLBAR;
if ((errormsg = invalid_range(eap)) == NULL) {
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index d6534a08ff..154a6a636a 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -2729,7 +2729,7 @@ static int vgetorpeek(bool advance)
timedout = true;
continue;
}
- // In Ex-mode \n is compatible with original Vim behaviour.
+
// For the command line only CTRL-C always breaks it.
// For the cmdline window: Alternate between ESC and
// CTRL-C: ESC for most situations and CTRL-C to close the