]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.405 v7.4.405
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Aug 2014 14:28:36 +0000 (16:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Aug 2014 14:28:36 +0000 (16:28 +0200)
Problem:    Screen updating is slow when using matches.
Solution:   Do not use the ">=" as in patch 7.4.362, check the lnum.

src/screen.c
src/testdir/test63.in
src/testdir/test63.ok
src/version.c

index 3ab53d9e27fac340b05d2f54dfda994be7698446..4c134f0e6d7044878853975fd9cffc096438b7af 100644 (file)
@@ -3858,7 +3858,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
                        {
                            shl->attr_cur = shl->attr;
                        }
-                       else if (v >= (long)shl->endcol)
+                       else if (v >= (long)shl->endcol && shl->lnum == lnum)
                        {
                            shl->attr_cur = 0;
                            next_search_hl(wp, shl, lnum, (colnr_T)v, cur);
index 5ec315ad7a595fbd097ade15ca43b0853ac068a2..a161d6745ca661e274979f2b6e33b62329c26aee 100644 (file)
@@ -3,6 +3,7 @@ Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
 
 STARTTEST
 :so small.vim
+:set encoding=utf8
 :" --- Check that "matcharg()" returns the correct group and pattern if a match
 :" --- is defined.
 :let @r = "*** Test 1: "
@@ -164,7 +165,27 @@ STARTTEST
 :if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1
 :  let @r .= "OK\n"
 :else
-:  let @r .= "FAILED\n"
+:  let @r .= "FAILED: " . v5 . "/" . v6 . "/" . v8 . "/" . v10 . "/" . v11 . "\n"
+:endif
+:call clearmatches()
+:"
+:call setline(1, 'abcdΣabcdef')
+:call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]])
+:1
+:redraw!
+:let v1 = screenattr(1, 1)
+:let v4 = screenattr(1, 4)
+:let v5 = screenattr(1, 5)
+:let v6 = screenattr(1, 6)
+:let v7 = screenattr(1, 7)
+:let v8 = screenattr(1, 8)
+:let v9 = screenattr(1, 9)
+:let v10 = screenattr(1, 10)
+:let @r .= string(getmatches())."\n"
+:if v1 != v4 && v5 == v4 && v6 == v1 && v7 == v1 && v8 == v4 && v9 == v4 && v10 == v1
+:  let @r .= "OK\n"
+:else
+:  let @r .= "FAILED: " . v4 . "/" . v5 . "/" . v6 . "/" . v7 . "/" . v8 . "/" . v9 . "/" . v10 . "\n"
 :endif
 :call clearmatches()
 G"rp
index f804b693accb28c69c23f437e6bdcaa7cd549efe..5d619395b7852709cfbb98f37a516878ad057c88 100644 (file)
@@ -12,3 +12,5 @@ Results of test63:
 *** Test 11:
 [{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}]
 OK
+[{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}]
+OK
index 42369f1d6ee0e354fada7471d8af41ebda9db569..28a3fdb3715ecb6a74227444e6617ee4f52dc317 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    405,
 /**/
     404,
 /**/