parent
37589fb7b4
commit
d5c10472f6
|
@ -835,7 +835,7 @@ struct WrapHighlighter : Highlighter
|
||||||
{
|
{
|
||||||
StringView line = buffer[coord.line];
|
StringView line = buffer[coord.line];
|
||||||
utf8::iterator<const char*> it{&line[col], line};
|
utf8::iterator<const char*> it{&line[col], line};
|
||||||
while (it != line.end() and it != line.begin() and is_word(*it))
|
while (it != line.end() and it != line.begin() and is_word<WORD>(*it))
|
||||||
--it;
|
--it;
|
||||||
|
|
||||||
if (it != line.begin() and it != &line[col] and
|
if (it != line.begin() and it != &line[col] and
|
||||||
|
|
1
test/highlight/wrap/avoid-odd-places/cmd
Normal file
1
test/highlight/wrap/avoid-odd-places/cmd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
6
test/highlight/wrap/avoid-odd-places/display
Normal file
6
test/highlight/wrap/avoid-odd-places/display
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "T" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "his is a long paragraph where we will see if the wrap highlighter tries to " }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\"Wrap\" between the quotes and the word.\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": " - unnamed0@[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] }
|
1
test/highlight/wrap/avoid-odd-places/in
Normal file
1
test/highlight/wrap/avoid-odd-places/in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
This is a long paragraph where we will see if the wrap highlighter tries to "Wrap" between the quotes and the word.
|
1
test/highlight/wrap/avoid-odd-places/rc
Normal file
1
test/highlight/wrap/avoid-odd-places/rc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
add-highlighter wrap -word
|
Loading…
Reference in New Issue
Block a user