Commit Graph

40 Commits

Author SHA1 Message Date
Maxime Coste
3fc8e29d10 Add support for curly underline and separate underline color
Add support for a third color in face definition that controls
the underline and a 'c' attribute for curly underline (that takes
precedence over 'u' if both are specified)

Allow empty colors to mean default, so that `,,red+u` means the
same as `default,default,red+u`

Fixes #4138
2021-09-07 08:21:26 +10:00
Skyler Hawthorne
fb04102fe3 add TODO comment highlighting 2021-05-02 20:38:42 -04:00
Skyler Hawthorne
4bff607758 add tests for rust let statements 2021-05-01 00:46:27 -04:00
Skyler Hawthorne
a25ef2bd6d fix rust pub highlight 2021-05-01 00:35:56 -04:00
Maxime Coste
e04cc1b4c8 Fix rust highlighting tests 2021-04-30 12:41:37 +10:00
Maxime Coste
1c9e460053 Fix escaping of single quotes in rust value highlighting test 2020-07-31 07:55:27 +10:00
Ivan Tham
dd6684a17d Split rust comment tests 2020-07-09 00:21:11 +08:00
Ivan Tham
21c38f37cd Fix rust character highlight 2020-07-09 00:21:11 +08:00
Ivan Tham
7bd459f774 Fix rust comment end 2020-07-09 00:21:11 +08:00
Ivan Tham
74e16a0623 Fix rust comment test 2020-07-09 00:21:11 +08:00
Ivan Tham
eac5986323 Fix rust doctest non-hidden macro highlight 2020-07-09 00:21:11 +08:00
Ivan Tham
4ccb5fd315 Highlight doc tests in rust
Feels a big laggy when system overloaded
2020-05-31 11:47:47 +08:00
Maxime Coste
08e0b663f7 Fix unintended interpretation of ranges length syntax
Ranges specified with a +<length> were inconsistent, with +0 meaning
an empty range, while +1 meant a two character long range (first character
+ the following one). Change that to mean a single character.

Fixes #3479
2020-05-29 12:25:57 +10:00
Maxime Coste
954373d3cf Support multi-line replace-ranges
This likely has lots of rough edges, but should be an initial proof
of concept to support folding.
2020-04-27 17:39:21 +10:00
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
Maxime Coste
0fdfbdfd15 Fix highlighting empty ranges at end of line and begin of line 2020-04-27 14:31:26 +10:00
Tim Allen
c7356b363e test: number-lines highlighter now reserves 2 digits by default.
Fixes regression caused by #3261.
2019-12-17 00:57:28 +11:00
Jason Felice
e888f4341c test: Allow expect-style UI tests, testing any var 2019-10-13 14:57:24 -04:00
Maxime Coste
229768841b Fix parsing of faces with a base but no attributes 2019-04-28 00:35:52 +01:00
Maxime Coste
4e24ba86cc Change faces alias to be a base that can be modified
Using <fg>,<bg>+<attr>@<base> will apply the given fg color,
bg color and attributes on top of base dynamically. Simply giving
<base> is a shorthand for default,default@<base>.

Inspired by the discussion in #2862
2019-04-23 23:15:23 +01:00
Maxime Coste
328c497be2 Add support for named captures to the regex impl and regex highlighter
ECMAScript is adding support for it, and it is a pretty isolated
change to do.

Fixes #2293
2019-01-03 22:55:50 +11:00
Maxime Coste
da13b5f814 Fix handling of capture matching in region highlighter
Also extend the highlight/regions test to validate that.
Thanks to lenormf for reviewing my change and finding this bug.
2018-10-15 21:21:12 +11:00
Maxime Coste
79ec8d0010 Rename highlighters that used an underscore to use a dash
For example `show_matching` is now `show-matching`.
2018-07-08 19:14:15 +10:00
Maxime Coste
2e0e206951 Make recurse regex opt-in with a -recurse switch instead of opt-out 2018-07-05 07:54:28 +10:00
Maxime Coste
63d7984b89 Fix bug in recursive region highlighting 2018-07-05 07:54:28 +10:00
Maxime Coste
f61bcef469 Fix tests and required scripts to get back to green make test 2018-07-05 07:54:28 +10:00
Maxime Coste
851494a374 test/run: Rename "display" expected ui output file as "ui-out" 2018-05-19 14:15:16 +10:00
Maxime Coste
e4f90e5ed2 Fix tests after changes to json_ui output 2018-04-29 23:06:24 +10:00
Delapouite
746b9acb96 Change client default name: "unnamed0" → "client0" 2018-04-23 11:42:11 +02:00
Maxime Coste
d49555fc75 Move highlighters into Scopes
That means we can now have highlighters active at global, buffer, and
window scope. The add-highlighter and remove-highlighter syntax changed
to take the parent path (scope/group/...) as a mandatory argument,
superseeding the previous -group switch.
2017-10-28 13:43:04 +08:00
Maxime Coste
89f016d871 Refactor column highlighter to make it more robust
Support arbitrary orders for column highlighters (it was previously
failing when column highlighters were not applied in column order).

Fix show_matching tab handling at the same time (horizontal scrolling,
tab characters and show_matching were behaving badly).

Window highlighting now runs user highlighters, then built-ins for each
phases, instead of running all phases for user highlighters, then all
phases for built-ins.

We now consider unprintable character to be 1-column width as we know
we will display them as "�".

Fixes #1615
Fixes #1023
2017-10-12 14:46:15 +08:00
Maxime Coste
d5c10472f6 Avoid wrapping between punctuation and word
Fixes #1550
2017-09-18 09:52:24 +09:00
Maxime Coste
f310db639c Rework partial line display logic
Instead of highlighting full lines and then trim them to make them
fit in the window, highlight only the visible portion, and rely on
the compute_display_setup system introduced for wrapping to setup
our buffer range correctly
2017-06-09 13:22:32 +01:00
Maxime Coste
7482d117cc Fix tests after addition of the set_cursor UI method 2017-04-12 10:48:52 +01:00
Dan Rosén
5a403a9611 Increase modelinefmt configuration power 2017-03-11 21:43:51 +01:00
Alex Leferry 2
671b50bb52 update command names 2017-01-04 13:04:27 +01:00
Maxime Coste
01417471b9 Change the test session name to avoid hitting the unix socket path length limit
On travis-ci, it seems the combination of a set TMPDIR and long sessions names
makes the test framework hit the path lenght limit.
2016-12-16 19:49:39 +00:00
Maxime Coste
4fc20b8d7d Rework client quitting and handling of remote errors
Client quitting no longer immediately unwinds, client is just pushed
for deletion until we get back to the main loop, similarly to what
happens for buffer and window deletion.
2016-09-04 17:56:07 +01:00
Maxime Coste
b1b6267137 Fix regions display test 2016-04-11 13:58:42 +01:00
Maxime Coste
ead6865350 Add an initial highlighting test 2016-03-08 13:42:27 +00:00