aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-03-22 19:49:07 +0100
committerGitHub <noreply@github.com>2017-03-22 19:49:07 +0100
commitf7aa1bfde6bc3600e4914cf38c777ff7f1ea56ab (patch)
tree6313ed25c7c2d306e5f2c150e4f3f2615da06ca7 /src/nvim/search.c
parenta1732b46abe48541f380d6a605fa7529c9a05da1 (diff)
parent1d8356a807e306eb82f2c1a7e2d2802407c7fa6e (diff)
downloadrneovim-f7aa1bfde6bc3600e4914cf38c777ff7f1ea56ab.tar.gz
rneovim-f7aa1bfde6bc3600e4914cf38c777ff7f1ea56ab.tar.bz2
rneovim-f7aa1bfde6bc3600e4914cf38c777ff7f1ea56ab.zip
Merge pull request #6335 from bfredl/mbyte_dead
mbyte: remove dead code
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 75862e1136..8c56eda7cf 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -2417,32 +2417,20 @@ static int cls(void)
int c;
c = gchar_cursor();
- if (p_altkeymap && c == F_BLANK)
+ if (p_altkeymap && c == F_BLANK) {
return 0;
- if (c == ' ' || c == '\t' || c == NUL)
- return 0;
- if (enc_dbcs != 0 && c > 0xFF) {
- /* If cls_bigword, report multi-byte chars as class 1. */
- if (enc_dbcs == DBCS_KOR && cls_bigword)
- return 1;
-
- /* process code leading/trailing bytes */
- return dbcs_class(((unsigned)c >> 8), (c & 0xFF));
}
- if (enc_utf8) {
- c = utf_class(c);
- if (c != 0 && cls_bigword)
- return 1;
- return c;
+ if (c == ' ' || c == '\t' || c == NUL) {
+ return 0;
}
- /* If cls_bigword is TRUE, report all non-blanks as class 1. */
- if (cls_bigword)
- return 1;
+ c = utf_class(c);
- if (vim_iswordc(c))
- return 2;
- return 1;
+ // If cls_bigword is TRUE, report all non-blanks as class 1.
+ if (c != 0 && cls_bigword) {
+ return 1;
+ }
+ return c;
}
/*