Maxime Coste
bdcfe30834
Fix scrolling when cursor is on a wrapped part of the last displayed line
2017-05-22 08:54:25 +01:00
Maxime Coste
dfaafcd49a
Rename range-faces to range-specs
...
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.
2017-05-17 19:40:52 +01:00
Maxime Coste
44d2db2706
Add a basic replace-ranges highlighter
...
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.
2017-05-15 09:12:10 +01:00
Olivier Perret
ec636ce04b
update line-flags and flag_lines doc to reflect current status
2017-05-11 20:45:28 +02:00
Maxime Coste
75e6b54ae2
Disable horizontal scroll offset support when wrapping
2017-05-11 09:23:20 +01:00
Maxime Coste
9300a981eb
Add support for the -passes option to the ref highlighter
2017-05-10 10:31:34 +01:00
Maxime Coste
5483a087d2
Make ref highlighter work for all highlight passes
2017-05-10 08:16:31 +01:00
Maxime Coste
59a0841baa
Update group highlighter docstring to document the passes option
2017-05-09 10:02:01 +01:00
Maxime Coste
12c498a0bd
Distinguish between BufferRanges and InclusiveBufferRanges
...
Fixes #1257
2017-05-08 12:34:57 +01:00
Maxime Coste
f9a609e479
Refactor range highlighting into a struct
2017-05-08 12:05:45 +01:00
Maxime Coste
ad1175fefc
Update wrap highlighter docstring
2017-05-08 11:30:51 +01:00
Maxime Coste
b0b40485ce
Move SimpleHighlighter as an implementation detail
2017-05-08 11:29:23 +01:00
Maxime Coste
a5d4dbc16e
Fix unneeded and wrong splitting of display atom during wrapping
2017-05-07 16:26:14 +01:00
Maxime Coste
e63156bcfb
Fix infinite loop with longer than width words in word wrap mode
2017-05-07 16:26:14 +01:00
Maxime Coste
4e9193a975
Slight highlighting related code cleanup
2017-05-07 16:26:14 +01:00
Maxime Coste
b4b08d10b4
Fix assert when wrapping a line that takes more than the full window height
2017-05-07 16:26:14 +01:00
Maxime Coste
4032d05c79
Reject 0 wrap column
2017-05-07 16:26:14 +01:00
Maxime Coste
8dd808726d
Add support for word wrapping with the -word switch to the wrap highlighter
2017-05-07 16:26:14 +01:00
Maxime Coste
bb17fb6dd3
Add a -passes
switch support for the group highlighter
2017-05-07 16:26:14 +01:00
Maxime Coste
fa5ae65f3a
Move passes logic to the base Highlighter class
...
Validate that childs of HighlighterGroup are matching its passes.
2017-05-07 16:26:14 +01:00
Maxime Coste
55631c8d8e
Detect errors while parsing flag line and handle them
...
Fixes #1345
2017-05-07 16:26:14 +01:00
Maxime Coste
053544d740
Disable horizontal scrolling when running a WrapHighlighter
2017-05-07 16:26:14 +01:00
Maxime Coste
23e38a254f
Introduce a LineNumberWrapped face
2017-05-07 16:26:14 +01:00
Maxime Coste
39826afde5
Make scrolling around work more correctly with wrapping
2017-05-07 16:26:14 +01:00
Maxime Coste
bd3ba77e96
Make Wrap highlighter only wrap on window width.
2017-05-07 16:26:14 +01:00
Maxime Coste
57c2b32d20
Introduce highlighting phases and display setup computation
...
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.
2017-05-07 16:26:14 +01:00
Maxime Coste
a4f9e29d60
Add a wrap highlighter
2017-05-07 16:26:14 +01:00
Maxime Coste
26a105b2b7
Style tweak in highglighters.cc
2017-04-24 07:04:15 +01:00
Maxime Coste
bee2180da7
Do not try to split non range atoms in column highlighter
...
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
2017-04-19 21:15:36 +01:00
Maxime Coste
777ba287e1
Merge faces in show_whitespaces highlighter instead of replacing it
2017-03-21 18:17:43 +00:00
Maxime Coste
e44f95820e
Fixes some clang-tidy warning and add a few missing meta.hh include
2017-03-16 23:34:02 +00:00
Maxime Coste
5f7464d90d
Try to clean up option include a bit
2017-03-16 09:57:39 +00:00
Maxime Coste
0faa5567ca
Fix crash on non utf8 files trigering highlighting of backward ranges
...
Fixes #1274
2017-03-09 23:40:34 +00:00
Maxime Coste
f0ae0b8410
Replace IdMap with HashMap
2017-03-07 01:12:37 +00:00
Maxime Coste
6373338c50
Replace uses of UnorderedMap with HashMap
2017-03-07 01:03:26 +00:00
Maxime Coste
9ba1665e58
Refactor show_whitespaces a bit
2017-02-09 23:52:38 +00:00
Maxime Coste
6163134f30
Merge remote-tracking branch 'lenormf/show-whitespaces-flags'
2017-02-09 23:33:08 +00:00
Maxime Coste
5342d67fa4
Remove unneeded padding in relative line numbers highlighting
...
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.
2017-02-07 23:01:23 +00:00
Maxime Coste
ce2b85ddac
Add -match-capture support for regions higlighter
...
Closes #837
2017-02-06 23:00:13 +00:00
Frank LENORMAND
5d86b58a38
Allow modifying the characters used when highlighting whitespace
...
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
2017-02-04 10:21:13 +03:00
Maxime Coste
e7e72747ed
Update ranges highlighter options according to buffer changes
2017-01-13 13:52:55 +00:00
Maxime Coste
dcd8f6ef01
Apply clang-tidy modernize to the codebase
2017-01-08 22:39:01 +00:00
Maxime Coste
fcd99d9c22
Use absolute distance for relative line numbering
...
Closes #1068
2016-12-26 22:10:25 +00:00
Maxime Coste
bc8b30c988
Replace some string concatenations with a format call
2016-12-07 13:57:16 +00:00
Maxime Coste
bc8c5522e2
Change ValueId to just be an enum class, it does not need any operators
2016-12-03 13:17:42 +00:00
Maxime Coste
5ff8245cc8
Display non breaking spaces with ⍽ in show_whitespaces hihglighter
...
Fixes #167
2016-12-02 13:59:34 +00:00
Maxime Coste
47a82b9855
Make ArrayView::subrange size arguement optional
2016-11-20 11:15:15 +00:00
Maxime Coste
6bfc68d4f3
Rename DisplayAtom::Types to avoid conflicts with struct BufferRange
2016-10-13 19:55:15 +01:00
Maxime Coste
4b6d4ec8eb
Small refactoring in highlighters.cc
2016-10-01 14:12:21 +01:00
Maxime Coste
28cfd0bb61
Fix get_column function and add some unit tests for fullwidth text
2016-10-01 13:45:00 +01:00