Maxime Coste
fc6a16a571
Fix corner cases in region highlighting
2014-06-16 19:41:07 +01:00
Maxime Coste
51da452dc4
Merge branch 'master' into hierarchical-highlighters
2014-06-16 01:06:09 +01:00
Maxime Coste
2acfe85281
Highlight selection cursors in a second pass
...
This allows cursors to overlap on next selection and still be
visible.
2014-06-16 00:59:05 +01:00
Maxime Coste
205e8b2889
Refactor highlighter command completions
2014-06-15 16:04:38 +01:00
Maxime Coste
9130f0334b
Remove defhl, use addhl -group
2014-06-12 22:35:40 +01:00
Maxime Coste
dac5e89e14
Add MultiRegionHighlighter
...
MultiRegionHighlighter provides a way to segment the buffer in
logical regions using the common left-most rule for finding the
next region. It then provides highlighting groups for each region
that can be filled.
2014-06-11 23:29:23 +01:00
Maxime Coste
0faf7ff5e6
Refactor region highlighter, extract code to helper classes
2014-06-11 23:29:15 +01:00
Maxime Coste
0a76fe3040
Add support for recursion in region highlighter
...
An optional parameter defines the recursion regex, that match
potential closers.
For example, %sh{ ... } blocks support nested { }, so defining \{
as the recurse regex make the region highlighter correctly match
%sh{ ... { ... } ... } constructs
2014-06-11 00:23:44 +01:00
Maxime Coste
37d66b1e0b
Convert Region highlighter to a HierarchicalHighlighter
...
add a region using addhl region <id> <begin_regex> <end_regex>
then fill the region with addhl -group <id>/content ...
2014-06-10 22:02:42 +01:00
Maxime Coste
4c942c4a3a
ref highlighter tolerates unexisting reference
2014-06-10 22:02:08 +01:00
Maxime Coste
ca93ae807d
Add a fill highlighter that just fills the display buffer
2014-06-10 21:46:16 +01:00
Maxime Coste
479c31b571
Replace FunctionGroup template with HighlighterGroup class
2014-06-10 19:58:02 +01:00
Maxime Coste
8d9ed5e8c7
Fix in region highlighter
2014-06-02 15:42:03 +01:00
Maxime Coste
ce469398c5
Revert "Use Modification for region highlighter"
...
This reverts commit aa64851de6
.
Conflicts:
src/highlighters.cc
2014-05-26 21:02:09 +01:00
Maxime Coste
0a060b62a2
Merge branch 'master' into remove-buffer-change-listener
2014-05-25 20:01:55 +01:00
Maxime Coste
fc0700d1fd
Fix segfault in region highlighter
2014-05-24 17:17:14 +01:00
Maxime Coste
aa64851de6
Use Modification for region highlighter
2014-05-21 23:35:11 +01:00
Maxime Coste
55959f2cb1
Make expand_unprintable more tolerant to invalid utf8
2014-05-21 00:24:58 +01:00
Maxime Coste
03e5264df4
Remove per lines timestamp in Buffer
2014-05-17 12:17:05 +01:00
Maxime Coste
211b78f536
Merge branch 'master' into remove-buffer-change-listener
...
Conflicts:
src/highlighters.cc
2014-05-17 11:39:56 +01:00
Maxime Coste
2f1388df7b
replace LineChangeWatcher with a free function compute_line_modifications
2014-05-14 21:19:19 +01:00
Maxime Coste
34e1c2ddd5
Fix RegexColorizer cache handling
2014-05-14 19:22:42 +01:00
Maxime Coste
016ede38d1
Fix show_matching highlighter when opening char is the first buffer char
...
Fixes #119
2014-05-13 19:45:32 +01:00
Maxime Coste
6b42c48c3f
Refactor DynamicRegexHighlighter, search hl uses Search colalias
...
fixes #122
2014-05-13 19:35:28 +01:00
Maxime Coste
c7d24ac7db
Add a show_whitespaces highlighter
2014-05-09 13:50:12 +01:00
Maxime Coste
8546788b43
Refactor LineAndColumn coordinates
...
BufferCoord -> ByteCoord
DisplayCoord -> CharCoord
Moved their definition along with LineAndColumn into coord.hh
2014-05-07 19:53:45 +01:00
Maxime Coste
26dd21706e
Replace some typedefs with usings
2014-05-01 19:03:13 +01:00
Maxime Coste
49bc7f8767
minor formatting cleanup
2014-04-27 12:37:58 +01:00
Maxime Coste
e94a82ac98
More OSX fixes
2014-04-02 22:52:00 +01:00
Maxime Coste
6d651c59d0
regionref highlighter just ignore invalid references
...
fixes #68
2014-02-25 00:19:31 +00:00
Maxime Coste
2159fc9563
Rename selections first,last to more explicit anchor,cursor
2014-01-28 19:06:52 +00:00
Maxime Coste
e364137196
Fix compilation with clang 3.4
2014-01-27 20:28:38 +00:00
Maxime Coste
a96b2d3cd2
Rework regions highlighter, refactor and extract line tracking
2014-01-27 19:51:58 +00:00
Maxime Coste
2cbb0bb27f
Add a show_matching highlighter
2014-01-20 21:02:43 +00:00
Maxime Coste
2ac545d306
RegionHighlighter: correct coordinates that are one past end of line
...
As region highlighters store per lines matches, end of line ones
are not valid buffer coordinates and must be corrected as begining
of next line.
2014-01-18 11:47:18 +00:00
Maxime Coste
5cffc48efc
Pass a HighlightFlags parameter to highlighters
...
When only highlighting for finding character position on screen
pass HighlightFlags::MoveOnly so that non moving highlighters do
not need to run.
2014-01-18 01:59:37 +00:00
Maxime Coste
e1eec8903a
only highlight actually displayed regions
2014-01-17 23:39:01 +00:00
Maxime Coste
a6b386e9b8
RegionHighlighter: Find the lines to be reparsed using the changes
2014-01-15 20:28:58 +00:00
Maxime Coste
c2f18e6e78
Use inplace_merge for sorting matches in region highlighter
2014-01-14 19:42:57 +00:00
Maxime Coste
86eaa64982
Optimization and code cleanup in the region highlighter.
2014-01-13 21:40:02 +00:00
Maxime Coste
737837216b
minor code cleanup
2014-01-12 21:24:59 +00:00
Maxime Coste
faabd24e11
Region highlighters track line changes in the buffer
...
This way, region highlighters only need to regex-parse lines that
actually changed. matches on lines that just moved around but whose
content did not change can be updated simply by updating their line
coordinate.
2014-01-12 16:28:11 +00:00
Maxime Coste
1d51e6922a
minor code cleanup
2014-01-10 13:36:40 +00:00
Maxime Coste
d466193ee7
Use a per line caching strategy for region highlighter
2014-01-09 22:52:39 +00:00
Maxime Coste
d96b5aa04d
Move highlighter cache logic to BufferSideCache template
2014-01-09 22:51:23 +00:00
Maxime Coste
85cc740de0
Use Buffer values for storing highlighting caches
2014-01-09 21:57:37 +00:00
Maxime Coste
aadbd390c7
Use wide character function for categorizing codepoints
...
Previously we used the is... rather than isw...
These functions were not supporting non ascii characters correctly
2014-01-05 15:14:58 +00:00
Maxime Coste
cb324a4b88
highlighters: add some optimization flags to regexes
2013-12-17 20:03:54 +00:00
Maxime Coste
d1ac813f61
Pass a Context rather than a Window to highlighters
2013-12-16 23:24:08 +00:00
Maxime Coste
e369b60258
Remove insert_hide_sel option
2013-12-15 14:57:55 +00:00