Commit Graph

73 Commits

Author SHA1 Message Date
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
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