aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2015-07-03 05:18:05 -0400
committerMichael Reed <m.reed@mykolab.com>2015-07-19 15:14:22 -0400
commit3931a36340b71f2c3b7ea65132176fda77fe36c4 (patch)
tree2aee06dfa50a152812f9bf44d586fafd95772815 /src
parentb19afa52c4ee679f62b5e7679694241f9a09ccba (diff)
downloadrneovim-3931a36340b71f2c3b7ea65132176fda77fe36c4.tar.gz
rneovim-3931a36340b71f2c3b7ea65132176fda77fe36c4.tar.bz2
rneovim-3931a36340b71f2c3b7ea65132176fda77fe36c4.zip
Remove POSIX 'cpoptions': '/'
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds.c14
-rw-r--r--src/nvim/option_defs.h3
-rw-r--r--src/nvim/testdir/test79.inbin3381 -> 3335 bytes
-rw-r--r--src/nvim/testdir/test79.okbin574 -> 570 bytes
-rw-r--r--src/nvim/testdir/test80.in4
-rw-r--r--src/nvim/testdir/test80.ok2
6 files changed, 3 insertions, 20 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index b4adef9235..2c92113404 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3472,18 +3472,8 @@ void do_sub(exarg_T *eap)
}
if (!eap->skip) {
- /* In POSIX vi ":s/pat/%/" uses the previous subst. string. */
- if (STRCMP(sub, "%") == 0
- && vim_strchr(p_cpo, CPO_SUBPERCENT) != NULL) {
- if (old_sub == NULL) { /* there is no previous command */
- EMSG(_(e_nopresub));
- return;
- }
- sub = old_sub;
- } else {
- xfree(old_sub);
- old_sub = vim_strsave(sub);
- }
+ xfree(old_sub);
+ old_sub = vim_strsave(sub);
}
} else if (!eap->skip) { /* use previous pattern and substitution */
if (old_sub == NULL) { /* there is no previous command */
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index 02a16a1a60..a8f26a7c3d 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -129,7 +129,6 @@
#define CPO_SPECI '<' /* don't recognize <> in mappings */
#define CPO_REGAPPEND '>' /* insert NL when appending to a register */
/* POSIX flags */
-#define CPO_SUBPERCENT '/' /* % in :s string uses previous one */
#define CPO_BACKSL '\\' /* \ is not special in [] */
#define CPO_CHDIR '.' /* don't chdir if buffer is modified */
#define CPO_SCOLON ';' /* using "," and ";" will skip over char if
@@ -138,7 +137,7 @@
#define CPO_VIM "aABceFs"
#define CPO_VI "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>;"
#define CPO_ALL \
- "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>/\\.;"
+ "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>\\.;"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],~"
diff --git a/src/nvim/testdir/test79.in b/src/nvim/testdir/test79.in
index 8278bd8000..afbf2083d2 100644
--- a/src/nvim/testdir/test79.in
+++ b/src/nvim/testdir/test79.in
Binary files differ
diff --git a/src/nvim/testdir/test79.ok b/src/nvim/testdir/test79.ok
index e22eee0b71..d4e0ae8819 100644
--- a/src/nvim/testdir/test79.ok
+++ b/src/nvim/testdir/test79.ok
Binary files differ
diff --git a/src/nvim/testdir/test80.in b/src/nvim/testdir/test80.in
index 406fb6dac7..e0bcb0114b 100644
--- a/src/nvim/testdir/test80.in
+++ b/src/nvim/testdir/test80.in
@@ -126,10 +126,6 @@ TEST_6:
STARTTEST
:set magic&
:$put =\"\n\nTEST_6:\"
-:set cpo+=/
-:$put =substitute('A', 'A', 'a', '')
-:$put =substitute('B', 'B', '%', '')
-:set cpo-=/
:$put =substitute('C', 'C', 'c', '')
:$put =substitute('D', 'D', '%', '')
/^TEST_7
diff --git a/src/nvim/testdir/test80.ok b/src/nvim/testdir/test80.ok
index b42f604a07..157a42dfc1 100644
--- a/src/nvim/testdir/test80.ok
+++ b/src/nvim/testdir/test80.ok
@@ -94,8 +94,6 @@ A123456789987654321
TEST_6:
-a
-%
c
%