Commit Graph

115 Commits

Author SHA1 Message Date
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
Maxime Coste
6afef079b6 Remove Editor::main_selection(|index), directly use the SelectionList method 2013-12-14 14:38:17 +00:00
Maxime Coste
ed484dc333 Region highlighter takes regexes for region start/end 2013-12-12 22:49:41 +00:00
Maxime Coste
277b02eee6 Add experimental region_ref highlighter
highlights a region using another highlighter.
2013-12-11 23:19:24 +00:00
Maxime Coste
35f12bc5a0 Use a cache for region highlighter 2013-12-04 18:52:16 +00:00
Maxime Coste
8b2f340238 Add basic region highlighter 2013-12-04 00:48:46 +00:00
Maxime Coste
45d5dbcc85 Add support for defining and referencing highlighters
* defhl <name> defines a shared highlighter
* addhl -def-group <name> adds highlighters to the defined highlighter
* addhl ref <name> add the defined highlighter to the window's ones
2013-12-03 22:07:23 +00:00
Maxime Coste
d880465f38 Do not pass a window to highlighters factories 2013-11-28 18:48:40 +00:00
Maxime Coste
a9d832965f RegexColorizer maintains a per buffer cache 2013-11-28 18:48:39 +00:00
Maxime Coste
255a747fdd Simplify FlagLines, do not try to update the option 2013-11-28 18:48:39 +00:00
Maxime Coste
dd6462ed57 regex option highlighter use runtime window rather than creation time one 2013-11-04 22:02:44 +00:00
Maxime Coste
eedd37c09a memoryview: always pass by value 2013-07-26 01:50:36 +02:00
Maxime Coste
3862b5cbb8 LineAndColumns: always pass by value 2013-07-26 01:50:09 +02:00
Maxime Coste
8f73d3c173 fix last eol matching in regex highlighters 2013-07-25 00:18:50 +02:00
Maxime Coste
d6425f1d50 merge AtomContent into DisplayAtom 2013-07-24 13:55:57 +01:00
Maxime Coste
c7e52a650d DisplayLine no longer map to a single buffer line, but to a buffer range 2013-07-24 01:33:12 +02:00
Maxime Coste
5a6922a045 expand_unprintable: use iscntrl rather than isprint which does not work as expected 2013-07-23 20:42:35 +02:00
Maxime Coste
c1b2f7ef6a use C locale function instead of C++ ones 2013-07-02 19:48:04 +01:00
Maxime Coste
245e68e26e utf8_iterators: rename underlying_iterator to base 2013-06-06 19:44:07 +02:00
Maxime Coste
51acd456cc remove BufferIterator::{line,column}() 2013-06-04 18:53:28 +02:00
Maxime Coste
c4f9253634 Remove Buffer::iterator_at_line_{begin,end}, use iterator_at(line{,+1}) 2013-06-04 14:21:07 +02:00
Maxime Coste
4ef1bfa4db Use coord instead of iterators for selections 2013-06-04 14:21:07 +02:00
Maxime Coste
3453ebbd52 BufferChangeListener: pass buffer to on_{inser,erase} 2013-06-01 00:48:46 +02:00
Maxime Coste
d5b190369a DisplayBuffer: use coords rather than iterators 2013-05-30 13:59:38 +02:00
Maxime Coste
81ce4e4720 pass window param to highlighters 2013-05-29 18:58:20 +02:00
Maxime Coste
6c290eff9a Buffer::do_{erase,insert} takes coord parameters rather than iterators
BufferChangeListeners do as well use coord rather than iterators
2013-05-29 18:58:20 +02:00
Maxime Coste
9991292bd3 tweak number line highlighter style 2013-05-24 18:39:28 +02:00
Maxime Coste
c3d53d588d revive str_to_int so that the good exception type is thrown on error 2013-05-17 14:09:42 +02:00
Maxime Coste
26f0fd4cc6 Use more std::* for string handling 2013-05-13 18:43:38 +02:00
Maxime Coste
56ab33c9d6 support specifying colors with RGB components 2013-05-13 14:25:05 +02:00
Maxime Coste
11bc24f992 FlagLines: use a shared updaters for options
previously, having two windows showing the same buffer with
the same line flags would have updated the options twice, resulting
in wrong lines in option. Now line flags options are updated only
once by a shared object along all FlagLines highlighter using the
same option.
2013-04-29 14:20:42 +02:00
Maxime Coste
dd3a7f739d FlagLines: do not create a new local option in window if the option comes from the buffer 2013-04-23 14:03:54 +02:00
Maxime Coste
5adee4a6a7 rename assert to kak_assert to avoid collisions 2013-04-09 20:04:11 +02:00
Maxime Coste
34b8604f90 move context implementation to context.cc 2013-04-09 19:39:03 +02:00