]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0535: newline escape wrong in ex mode v9.1.0535
authorMohamed Akram <mohd.akram@outlook.com>
Sat, 6 Jul 2024 15:12:09 +0000 (17:12 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 6 Jul 2024 15:12:09 +0000 (17:12 +0200)
commitf3daa4525b1816e475fbfe7add6f3c4a33b13944
tree46fc7a5fc6c63a44ee6b558d32e767e0f62c3687
parent84ca1388d8d9a9858f37a5c0586527589cbdadda
patch 9.1.0535: newline escape wrong in ex mode

Problem:  newline escape wrong in ex mode (Konrad Schwarz)
Solution: partly revert patch 7.3.014, remove backslash in front of a
          newline when not in prompt mode in ex line mode
          (Mohamed Akram)

This fixes newline escaping to allow passing multiple commands to
":global", multiple lines to shell commands, and ending lines in append
mode with backslashes. This should fix a POSIX/(traditional) VI
incompatiblity.

This reverts a previous incorrect attempt at patch v7.3.014 to fix
append mode which removed half of trailing backslashes which lead to,
eg. the following two commands being parsed as having a different number
of backslashes:

```
!echo foo\\\
```

```
!echo foo\\ \
```

fixes: #6135
fixes: #7244
closes: #15120

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/ex_docmd.c
src/ex_getln.c
src/testdir/test_ex_mode.vim
src/version.c