Fix bug in recursive region highlighting

This commit is contained in:
Maxime Coste 2018-07-02 17:42:19 +10:00
parent 3c2e7e13c6
commit 63d7984b89
5 changed files with 13 additions and 2 deletions

View File

@ -1722,7 +1722,6 @@ struct RegionMatches
if (beg_pos != end_it->end_coord())
beg_pos = end_it->end_coord();
else
++end_it;
}
}

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
foo(bar '()')

View File

@ -0,0 +1,3 @@
add-highlighter window/regions_test regions
add-highlighter window/regions_test/code default-region fill yellow
add-highlighter window/regions_test/argument region '\w+\h*\(\K' '(?=\))' '\(' fill red

View File

@ -0,0 +1,7 @@
{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }
{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "f" }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "oo(" }, { "face": { "fg": "red", "bg": "default", "attributes": [] }, "contents": "bar '()'" }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": ")\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] }
{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }
{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }
{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] }
{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] }
{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }