diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-02 02:33:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-02 02:33:36 +0100 |
commit | ed4132d7e9a7a3bda21c35119ce221146493e986 (patch) | |
tree | 898591a424f3ea3fd91e0adac6d19c881c258e64 /src/nvim/search.c | |
parent | 708176aea18e236b7ebc96a3f51dae22b366cc12 (diff) | |
download | rneovim-ed4132d7e9a7a3bda21c35119ce221146493e986.tar.gz rneovim-ed4132d7e9a7a3bda21c35119ce221146493e986.tar.bz2 rneovim-ed4132d7e9a7a3bda21c35119ce221146493e986.zip |
cleanup: remove legacy `enc_dbcs` global #9660
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r-- | src/nvim/search.c | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index d635763acc..5566df74ef 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3229,37 +3229,18 @@ static int in_html_tag(int end_tag) int lc = NUL; pos_T pos; - if (enc_dbcs) { - char_u *lp = NULL; - - /* We search forward until the cursor, because searching backwards is - * very slow for DBCS encodings. */ - for (p = line; p < line + curwin->w_cursor.col; MB_PTR_ADV(p)) { - if (*p == '>' || *p == '<') { - lc = *p; - lp = p; - } - } - if (*p != '<') { // check for '<' under cursor - if (lc != '<') { - return false; - } - p = lp; - } - } else { - for (p = line + curwin->w_cursor.col; p > line; ) { - if (*p == '<') { // find '<' under/before cursor - break; - } - MB_PTR_BACK(line, p); - if (*p == '>') { // find '>' before cursor - break; - } + for (p = line + curwin->w_cursor.col; p > line; ) { + if (*p == '<') { // find '<' under/before cursor + break; } - if (*p != '<') { - return false; + MB_PTR_BACK(line, p); + if (*p == '>') { // find '>' before cursor + break; } } + if (*p != '<') { + return false; + } pos.lnum = curwin->w_cursor.lnum; pos.col = (colnr_T)(p - line); |