range-faces are now used to replace-range highlighters, where the string
part is not interpretted as a face but as a display line, so the name was
not relevant anymore.
replace-ranges is takes a range-faces option, but treats the face
string as a display line to be parsed, and replaces the range display
with this display line.
Highlighters now run in 3 phases:
Wrap, Move, and Colorize. That way we guarantee the wrap
highlighter runs first, then eventual line numbers/flags,
and finally the colorizers.
We also run a `compute_display_setup` method thats responsible
for computing the lines that will be displayed, eventually
scrolling the view to ensure the cursor is visible.
That means we wont have a very nice interaction between show_whitespaces
and column highlighters, but thats the simplest fix for now, if we want
a better behaviour we need to introduce a way to know that a replaced
range is splittable (meaning it means to have the same amount of columns
as the range it replaces)
Fixes#1275
We were still adding one more char to the line number width in case
it would contain a minus sign. The minus signs are not used anymore
in relative line numbering so we dont need to keep that addtional
char which is always a blank.
This commit adds the following flags to the `show_whitespaces`
highlighter, with a one character long parameter:
* `-lf`: character replacing line feeds
* `-spc`: character replacing spaces
* `-nbsp`: character replacing non breakable spaces
* `-tab`: character replacing a tabulation
* `-tabpad`: character used as padding after a tabulation to satisfy
the `tabstop` option
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes#811