Created
February 25, 2015 17:58
-
-
Save mattn/fdfa90fff7d68cdb566f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r b64f0df9399c src/regexp_nfa.c | |
--- a/src/regexp_nfa.c Tue Feb 17 17:50:26 2015 +0100 | |
+++ b/src/regexp_nfa.c Thu Feb 26 02:58:43 2015 +0900 | |
@@ -6474,20 +6474,20 @@ | |
int op = t->state->c - NFA_VCOL; | |
colnr_T col = (colnr_T)(reginput - regline); | |
win_T *wp = reg_win == NULL ? curwin : reg_win; | |
+ int ts = wp->w_buffer->b_p_ts; | |
+ | |
+ /* Guess that a character won't use more columns than | |
+ * 'tabstop', with a minimum of 4. */ | |
+ if (ts < 4) | |
+ ts = 4; | |
/* Bail out quickly when there can't be a match, avoid the | |
* overhead of win_linetabsize() on long lines. */ | |
- if (op != 1 && col > t->state->val) | |
+ if (op != 1 && col > t->state->val * ts) | |
break; | |
result = FALSE; | |
if (op == 1 && col - 1 > t->state->val && col > 100) | |
{ | |
- int ts = wp->w_buffer->b_p_ts; | |
- | |
- /* Guess that a character won't use more columns than | |
- * 'tabstop', with a minimum of 4. */ | |
- if (ts < 4) | |
- ts = 4; | |
result = col > t->state->val * ts; | |
} | |
if (!result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment