Commit Graph

67 Commits

Author SHA1 Message Date
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
Maxime Coste
6ffdfd7735 Add get_color helper function 2013-04-04 18:47:34 +02:00
Maxime Coste
4fbe2dc6bc compile with -pedantic option and fix warnings 2013-04-04 14:04:37 +02:00
Maxime Coste
cd16a7ff18 FlagLines triggers a window redraw when option is modified 2013-04-02 13:58:28 +02:00
Maxime Coste
75fae291e1 Fix flags width handling in FlagLine highlighter 2013-04-01 03:49:30 +02:00
Maxime Coste
6c2430ce08 FlagLines updates the lines in the option according to buffer modifications 2013-03-31 14:53:32 +02:00
Maxime Coste
a80cee0d2c Add support for tuple Options, implement LineAndFlag using that 2013-03-29 19:35:48 +01:00
Maxime Coste
01968cb96e String: inherit from std::string rather than using it as a backend 2013-03-29 19:35:48 +01:00
Maxime Coste
251f09ff89 Merge {Filter,Highlighter}Group in a FunctionGroup template 2013-03-27 13:45:22 +01:00
Maxime Coste
c6a1fed6b4 add regex_option highlighter, which takes a regex option name and highlight all its matches 2013-03-26 14:26:59 +01:00
Maxime Coste
1982144b04 Add a special option type LineAndFlag, use it for FlagLines highlighter 2013-03-26 00:14:38 +01:00
Maxime Coste
42fae29391 Add an 'insert_hide_sel' option, which hides selection when inserting 2013-03-19 14:04:24 +01:00
Maxime Coste
6907fcf76e more robust implementation of expand_unprintable 2013-03-18 23:35:23 +01:00
Maxime Coste
354ae7ad89 Editor: keep selections sorted and use an index for the main one 2013-03-18 19:09:07 +01:00
Maxime Coste
1e8a109d0d Use some builtins colors aliases instead of hardcoded values for highlighters 2013-03-06 20:33:20 +01:00
Maxime Coste
f677d4ba32 Use a ColorPair in DisplayAtoms instead of separate fg/bg colors 2013-03-06 20:28:02 +01:00
Maxime Coste
4712765e8a Add FlagLines highlighter
This highlighter show a given flag in front of each lines whose number
is present in a given int-list option
2013-03-06 14:27:33 +01:00
Maxime Coste
fb7234544e HighlightersFactories takes back a Window parameter 2013-03-06 14:27:33 +01:00
Maxime Coste
fac222a427 Strongly typed options support
* non builtins options require declaration using the decl command

* At the moment, only int and string options are supported, however
the goal of this change is to provide a consistent way to support
more complex options, namely lists and booleans
2013-03-05 18:49:26 +01:00
Maxime Coste
a36befd653 Use colors instead of underline to highlight selections 2013-03-01 19:31:14 +01:00
Maxime Coste
d23694e31f Do not use a factory for window builtins highlighters
This helps cleanup up the code, as factories no longer takes
a window as parameter.
2013-03-01 19:15:05 +01:00
Maxime Coste
8ef79c41bd show_line_numbers does not need a window 2013-03-01 14:30:30 +01:00
Maxime Coste
6d4552e7d8 Add an expand_unprintable highlighter which replaces unprintable char with U+XXXX 2013-02-26 14:12:21 +01:00
Maxime Coste
4b649d386c various code style fixes 2013-01-04 18:39:13 +01:00
Maxime Coste
4f6507b808 Highlight last selection differently 2013-01-03 14:01:34 +01:00
Maxime Coste
074a21463b add a current search highlighter 2012-12-31 14:37:11 +01:00
Maxime Coste
bf07d2576e minor refactoring in highlight_range 2012-12-13 18:50:27 +01:00
Maxime Coste
d2f811a8d5 Refactor filter and highlighter registry into a common template 2012-11-23 13:40:20 +01:00
Maxime Coste
3b5530ac09 rename (hook|option)_manager to (hook|option)s.
And Global(Hook|Option)Manager to Global(Hook|Option)s
2012-11-22 13:50:29 +01:00
Maxime Coste
7e046e3f0b utf8 awareness in editor, highlighters and ncurses 2012-10-08 14:27:43 +02:00
Maxime Coste
4b0ccb0437 String and BufferIterator value_type goes back to plain char 2012-10-01 20:20:08 +02:00
Maxime Coste
b245b39a85 RegexColorizer: store ColorPairs by pointer so that alias changes are taken into account 2012-09-17 21:02:08 +02:00
Maxime Coste
5cf947f845 Add a ColorRegistry class responsible of color parsing and supporting aliases
colalias command permits to define names for color pairs
2012-09-17 19:01:13 +02:00
Maxime Coste
bbce6b22a3 remove regex.hh, define Regex directly in string.hh 2012-08-29 21:49:36 +02:00
Maxime Coste
0d8cce2728 use a strongly typed int LineCount for line counts 2012-08-22 23:33:52 +02:00
Maxime Coste
3f471c138a RegexColorizer: fix last buffer line highlighting 2012-08-21 20:53:23 +02:00
Maxime Coste
8a6e8cd898 RegexColorizer: Fix range computation 2012-08-17 18:42:07 +02:00
Maxime Coste
260b30e6d9 misc cleanups 2012-08-15 17:55:58 +02:00
Maxime Coste
9e3323bf68 RegexColorizer only cache a range instead of the whole buffer 2012-08-15 17:24:08 +02:00
Maxime Coste
6e70b805df colorize_regex become RegexColorizer and maintain a cache of matches 2012-08-15 17:08:48 +02:00
Maxime Coste
a30b3e1343 highlight_range: handle empty ranges 2012-08-10 14:20:15 +02:00
Maxime Coste
b29b75aa81 Regex Highlighter: highlight 10 lines above and below displayed range
and some code cleanup
2012-08-08 19:02:36 +02:00
Maxime Coste
661c9db925 colorize_regex_factory: transform boost::regex_error in Kakoune::runtime_error 2012-08-07 00:32:21 +02:00
Maxime Coste
b69134c36f new regex highlighter parameters syntax, support per capture highlight 2012-08-07 00:13:54 +02:00
Maxime Coste
399b9b6235 optimize regex highlighter's regex 2012-07-18 19:02:41 +02:00
Maxime Coste
03d8efc249 DisplayBuffer: add range and compute_range methods 2012-07-12 23:51:13 +02:00
Maxime Coste
b1a087485c DisplayBuffer rewrite, a DisplayBuffer is now a list of DisplayLines
Code is now greatly simplified using this architecture, and
DisplayAtoms no longer know their DisplayCoords and can be in any
order.
2012-07-12 23:19:10 +02:00
Maxime Coste
5cbded8221 make display buffers and highlighters handle better longer than display lines
still work in progress, I think the whole display system will in fact need
a rewrite.
2012-07-03 23:23:07 +02:00
Maxime Coste
20315eac85 replace Option::operator {String,int} with Option::as_{string,int} 2012-06-12 18:26:20 +00:00