aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Bürgin <676c7473@gmail.com>2015-05-01 15:25:48 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-05-25 16:29:00 -0400
commit44175224ccc75e8feaf2fab594abf957024f79b8 (patch)
tree63982aa72f57a072628afd6ab24387c4e94e2449 /src
parent297973ab00155048a627e8bf72ff4b14d71a6a01 (diff)
downloadrneovim-44175224ccc75e8feaf2fab594abf957024f79b8.tar.gz
rneovim-44175224ccc75e8feaf2fab594abf957024f79b8.tar.bz2
rneovim-44175224ccc75e8feaf2fab594abf957024f79b8.zip
'cpoptions': Remove "j" flag
Diffstat (limited to 'src')
-rw-r--r--src/nvim/edit.c7
-rw-r--r--src/nvim/ops.c8
-rw-r--r--src/nvim/option_defs.h5
-rw-r--r--src/nvim/search.c6
4 files changed, 11 insertions, 15 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 31a5c54c20..9704295aaa 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3719,11 +3719,10 @@ static int ins_compl_get_exp(pos_T *ini)
/* IObuf =~ "\k.* ", thus len >= 2 */
if (p_js
&& (IObuff[len - 2] == '.'
- || (vim_strchr(p_cpo, CPO_JOINSP)
- == NULL
- && (IObuff[len - 2] == '?'
- || IObuff[len - 2] == '!'))))
+ || IObuff[len - 2] == '?'
+ || IObuff[len - 2] == '!')) {
IObuff[len++] = ' ';
+ }
}
/* copy as much as possible of the new word */
if (tmp_ptr - ptr >= IOSIZE - len)
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index dfc41d5685..0b95dd4642 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3460,12 +3460,10 @@ int do_join(long count,
endcurr1 = endcurr2;
else
++spaces[t];
- /* extra space when 'joinspaces' set and line ends in '.' */
- if ( p_js
- && (endcurr1 == '.'
- || (vim_strchr(p_cpo, CPO_JOINSP) == NULL
- && (endcurr1 == '?' || endcurr1 == '!'))))
+ // Extra space when 'joinspaces' set and line ends in '.', '?', or '!'.
+ if (p_js && (endcurr1 == '.' || endcurr1 == '?' || endcurr1 == '!')) {
++spaces[t];
+ }
}
}
currsize = (int)STRLEN(curr);
diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h
index de8816af0a..80f2373a85 100644
--- a/src/nvim/option_defs.h
+++ b/src/nvim/option_defs.h
@@ -97,7 +97,6 @@
#define CPO_FNAMEW 'F' /* set file name for ":w file" */
#define CPO_INTMOD 'i' /* interrupt a read makes buffer modified */
#define CPO_INDENT 'I' /* remove auto-indent more often */
-#define CPO_JOINSP 'j' /* only use two spaces for join after '.' */
#define CPO_ENDOFSENT 'J' /* need two spaces to detect end of sentence */
#define CPO_KEYCODE 'k' /* don't recognize raw key code in mappings */
#define CPO_KOFFSET 'K' /* don't wait for key code in mappings */
@@ -141,9 +140,9 @@
* cursor would not move */
/* default values for Vim, Vi and POSIX */
#define CPO_VIM "aABceFs"
-#define CPO_VI "aAbBcCdDeEfFiIjJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>;"
+#define CPO_VI "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>;"
#define CPO_ALL \
- "aAbBcCdDeEfFiIjJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>#{|&/\\.;"
+ "aAbBcCdDeEfFiIJkKlLmMnoOpPqrRsStuvWxXyZ$!%+<>#{|&/\\.;"
/* characters for p_ww option: */
#define WW_ALL "bshl<>[],~"
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 464e112900..e10504973b 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -4335,10 +4335,10 @@ search_line:
/* IObuf =~ "\(\k\|\i\).* ", thus i >= 2*/
if (p_js
&& (IObuff[i-2] == '.'
- || (vim_strchr(p_cpo, CPO_JOINSP) == NULL
- && (IObuff[i-2] == '?'
- || IObuff[i-2] == '!'))))
+ || IObuff[i-2] == '?'
+ || IObuff[i-2] == '!')) {
IObuff[i++] = ' ';
+ }
}
/* copy as much as possible of the new word */
if (p - aux >= IOSIZE - i)