home/test/highlight/replace-only-fully-selected-ranges/script
Maxime Coste cb119251bc Do not replace partially selected ranges in replace-ranges highlighter
Partially selected ranges should not be replaced to make it possible
to see what is actually selected.
2020-04-27 17:39:21 +10:00

8 lines
2.1 KiB
Plaintext

ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "blue", "attributes": [] }, "contents": "1" }, { "face": { "fg": "black", "bg": "blue", "attributes": [] }, "contents": "replaced" }, { "face": { "fg": "black", "bg": "blue", "attributes": [] }, "contents": " text" }, { "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "5" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "replaced" }, { "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": " text" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "5\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "2" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "345\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] }'
ui_out '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }'
ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }'
ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 3:2 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "[+]" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "3 sels (3)" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] }'
ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 2, "column": 1 }] }'
ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'