Maxime Coste
ec37adc523
Fix bug in nested highlighting
2014-07-14 21:41:29 +01:00
Maxime Coste
d5d76721b0
Avoid infinite loop in MultiRegionHighlighter when regexes generate empty matches
2014-07-14 20:46:46 +01:00
Alex Leferry 2
12cdfb316a
underline (MatchingChar|Search) faces
2014-07-14 20:23:56 +01:00
Maxime Coste
b96f653b6c
Fix numbering with '#' register
2014-07-14 19:00:54 +01:00
Maxime Coste
cbfceba149
Do not resolve faces in highlighter factories, defer to actual highlighting
2014-07-13 16:52:51 +01:00
Maxime Coste
d78ece490f
Rename RegexColorizer to RegexHighlighter
2014-07-12 13:57:16 +01:00
Maxime Coste
72ccb9bce6
Refactor RegexColorizers face handling
2014-07-12 11:19:35 +01:00
Maxime Coste
d0d4108085
Rename :colalias to :face and update documentation
2014-07-12 10:55:50 +01:00
Maxime Coste
608e188960
Support attributes in face specifications
2014-07-11 00:44:59 +01:00
Maxime Coste
a32b49acd1
Rename ColorPair to Face and ColorRegistry to FaceRegistry
...
Face also stores the attributes
2014-07-11 00:27:43 +01:00
Maxime Coste
42611aef1e
Fix select_number
2014-07-10 19:22:14 +01:00
Maxime Coste
b6979e2d2c
Add docstring for normal mode commands and display them if autoinfo >= 2
2014-07-10 19:22:14 +01:00
Maxime Coste
4c3bd68876
Change autoinfo option to be an integer, allowing different levels
2014-07-10 19:22:14 +01:00
Maxime Coste
81d3eadd09
:edit! without argument reload current buffer
2014-07-10 19:22:14 +01:00
Maxime Coste
9952704eaf
Fix :map scope completion
2014-07-08 00:53:06 +01:00
Maxime Coste
c6df0c9174
Do not write '*** kak: fifo closed ***' in buffers
...
The status line '[fifo]' flag should replace that
2014-07-07 23:56:17 +01:00
Maxime Coste
55866b51d7
Fix redrawing of windows when only the status line changes
2014-07-07 23:56:17 +01:00
Maxime Coste
90c2647c0b
Use colors in status bar for certain flags
2014-07-07 23:56:17 +01:00
Maxime Coste
7726db0799
NCurses: change scroll bar characters
2014-07-05 19:18:59 +01:00
Maxime Coste
fc7f017372
Remove 'ReplaceMain' select mode
2014-07-05 12:37:49 +01:00
Maxime Coste
a61db7ef5e
Merge remote-tracking branch 'alexherbo2/previous-match'
2014-07-05 12:36:35 +01:00
Maxime Coste
9439d28028
More consistent <space> and <a-space> behaviour
...
<space> and <a-space> without count now remove all except/keep
main selection. Without reducing main selection to cursor.
Reduce to cursor is moved to ';' and flip selections to <a-;>
2014-07-05 12:10:06 +01:00
Maxime Coste
60bf540ee6
NCurses: better support for 256 color terminals that cannot change colors
2014-07-05 12:10:06 +01:00
Maxime Coste
d181a40a91
Add support for paste all (on <a-[pP]>)
...
Paste all pastes all yanked text at all selections, selecting each
pasted text.
Replace paste moves to R, and concat yank/concat delete (Y and D)
are removed.
Fixes #161
2014-07-05 12:10:06 +01:00
Maxime Coste
8795efdf19
Minor style cleanup
2014-07-05 12:10:06 +01:00
Maxime Coste
ed68d1ff28
utf8: use end of sequence iterators for more security
2014-07-05 12:10:06 +01:00
Maxime Coste
3f70d91f8c
Use unsigned char rather than char in utf8 decoding to avoid sign extension
2014-07-05 12:10:06 +01:00
Alex Leferry 2
581dc59fb8
add alt-n commands to (replace|append) previous match
...
Note: alt-n command were used to replace main selection with next match
(preserving the others)
2014-07-03 15:27:07 +02:00
Maxime Coste
d69664f401
Add :waq for write all an quit, with slight refactoring
...
Fixes #175
2014-07-01 20:38:55 +01:00
Maxime Coste
ffe8143cc7
Accept upper case macro names, convert them to lower case
2014-07-01 08:48:52 +01:00
Maxime Coste
b18db68c8a
Fix spurious eol appearing in non scrolling fifo buffers
2014-06-30 18:56:18 +01:00
Maxime Coste
d6bb5b5a4b
Canonicalize filenames when checking if a buffer was written to its file
2014-06-29 22:03:59 +01:00
Maxime Coste
df3bf7445d
Replace boost::optional with our own implementation
2014-06-27 21:10:09 +01:00
Maxime Coste
7aa78d726a
fix potential infinite loop in show_matching highlighter
2014-06-27 21:10:09 +01:00
Maxime Coste
63878b03c5
Style fixes
2014-06-26 19:01:39 +01:00
Maxime Coste
047488a8da
Fix recursive string parsing, correct handling of escapes
2014-06-26 18:59:41 +01:00
Maxime Coste
5b27b956ad
Rename utf8::utf8_iterator to utf8::iterator
2014-06-24 19:10:57 +01:00
Maxime Coste
b934c8ede5
Fix crash in Context::main_sel_register_value
2014-06-23 13:16:51 +01:00
Maxime Coste
df4983b6d4
Do not try to reload buffer if the buffer was deleted
...
Fixes #121
2014-06-22 11:09:44 +01:00
Maxime Coste
b89b7c754f
Add \ in normal mode to disable user hooks on next normal command
...
Fixes #112
2014-06-21 22:06:02 +01:00
Maxime Coste
edd883ad18
Only user hooks can be disabled
2014-06-21 12:08:19 +01:00
Maxime Coste
7235180614
Use main selection index as default when accessing only one register value
...
Fixes #117
2014-06-21 11:31:08 +01:00
Maxime Coste
e202b7af50
Add a line_option highlighter that highlight the line stored in an int option
...
Use it to highlight the current error in the *make* buffer
2014-06-18 20:50:39 +01:00
Maxime Coste
6f2569ff30
Color Default now means 'keep as is' for most highlighters
2014-06-18 20:33:23 +01:00
Maxime Coste
54590f5d79
Minor code cleanup in highlighters
2014-06-18 20:31:49 +01:00
Maxime Coste
1c69764774
Merge branch 'master' into hierarchical-highlighters
2014-06-18 20:20:58 +01:00
Maxime Coste
9aa8c8a60a
Add a %val{...} expand type
...
%val{name} gives access to values given in shell through $kak_<name>
2014-06-18 19:32:13 +01:00
Maxime Coste
b8a205b858
Use -group rather than -id in hooks to mirror highlighters closer
2014-06-16 20:42:12 +01:00
Maxime Coste
3ef5bf53d5
Add BufCloseFifo hook and use that to remove fifo directories
2014-06-16 19:50:20 +01:00
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
e78fd2d235
Do not merge overlapping selection when entering append mode
...
Fixes #163
2014-06-16 01:05:38 +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
c87e81e8de
Use zstr instead of c_str in ncurses addutf8str
2014-06-16 00:53:25 +01:00
Maxime Coste
b5f5610cbe
Share implementation in complete_id/complete_group_id
2014-06-16 00:49:39 +01:00
Maxime Coste
205e8b2889
Refactor highlighter command completions
2014-06-15 16:04:38 +01:00
Maxime Coste
89d30cbb21
Fix selection update
2014-06-14 14:07:42 +01:00
Maxime Coste
fa5b6b716d
Fix crash in paragraph selection
2014-06-14 14:07:21 +01:00
Maxime Coste
e0cd8ad93c
Fix crash in paragraph selection
2014-06-14 14:07:03 +01:00
Maxime Coste
9130f0334b
Remove defhl, use addhl -group
2014-06-12 22:35:40 +01:00
Maxime Coste
af750ce186
Fix selection update
2014-06-12 21:23:49 +01:00
Maxime Coste
346de52633
add postfix increment to ParameterParser iterator
2014-06-12 20:03:17 +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
Alex Leferry 2
d5b1605df5
add ' ' for whitespaces object
2014-06-11 20:48:38 +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
4bb62d63e6
Add HierachicalHighlighter class
...
HierachicalHighlighter contains a map of names to HighlighterGroup
and can wrap any highlighter that wants to access user settable
sub groups.
2014-06-10 21:35:03 +01:00
Maxime Coste
479c31b571
Replace FunctionGroup template with HighlighterGroup class
2014-06-10 19:58:02 +01:00
Maxime Coste
e6a9780490
Fix tabs-to-spaces an spaces-to-tabs with the selection refactor
2014-06-10 13:30:37 +01:00
Maxime Coste
5245f0073c
Refactor InputMode::Insert::prepare
2014-06-09 23:23:49 +01:00
Maxime Coste
f54f8818c6
Merge branch 'master' into remove-buffer-change-listener
2014-06-09 19:29:40 +01:00
Maxime Coste
4834504508
Do not touch the reference line in copy_indent
2014-06-09 19:27:57 +01:00
Maxime Coste
cf2609de1c
Tweak prompt completion behaviour
...
Always select the common prefix if we just updated the list of
completions. The previous behaviour was to ignore it if we had
it already typed. Do that only if it was already displayed.
2014-06-09 13:47:37 +01:00
Maxime Coste
052d877ee6
Safer implementation of signal handlers in ncurses.cc
...
On recent ncurses implementation on cygwin, the old method provoked
freezes. Avoid calling ncurses functions in signal handlers.
We still call an unsafe function (EventManager::force_signal)...
2014-06-09 13:47:36 +01:00
Maxime Coste
732d1c3bd1
Improve commands documentation
2014-06-06 13:58:35 +01:00
Maxime Coste
be8f875b4f
Remove -env-var-params support in :def command
...
It is not used
2014-06-06 13:57:23 +01:00
Maxime Coste
d33554a1cc
Add support for long names for registers
...
We can now access register / with the name slash, * with star,
and | with pipe
Fixes #23
2014-06-06 00:49:36 +01:00
Maxime Coste
1ffafa8650
Merge branch 'master' into remove-buffer-change-listener
2014-06-06 00:22:46 +01:00
Maxime Coste
2d5c730441
Replace CommandManager::register_command*s* with register_alias
2014-06-06 00:21:12 +01:00
Maxime Coste
ffd860c1da
Use a id_map implementation for SwitchMap
...
That way parameter definition order is respected when writing
command doc strings.
2014-06-06 00:21:09 +01:00
Maxime Coste
c28a61187b
Fix handling of empty insert
2014-06-05 19:44:56 +01:00
Maxime Coste
26f69b199e
Rework and fix corner cases in selection updating code
2014-06-05 19:44:56 +01:00
Maxime Coste
1533a28394
Properly handle unicode in key parsing
...
Fixes #139
2014-06-05 19:42:27 +01:00
Maxime Coste
f7e89bc9f8
Fix selection updating, avoid overlapping selections
2014-06-02 17:36:46 +01:00
Maxime Coste
8d9ed5e8c7
Fix in region highlighter
2014-06-02 15:42:03 +01:00
Maxime Coste
c8354588c9
Remove undo group optimizer
2014-06-02 15:17:56 +01:00
Maxime Coste
d33c27acdf
Move compute_modified_ranges to selection.cc and use an optimized approach
2014-06-02 15:13:56 +01:00
Maxime Coste
23a1914d7e
Optimize SelectionList::update in the case where changes are backward
...
This case arise on undo, reverse sorted changes that are not overlapping.
2014-06-02 02:16:19 +01:00
Maxime Coste
a5e028e1b1
Add Context::set_selections(std::vector<Selection>)
...
This methods avoids updating the context selection needlessly as
they are going to get replaced anyway.
2014-06-01 16:01:38 +01:00
Maxime Coste
1b30c0f4fb
Extract merge_overlapping as a free function template
2014-06-01 15:57:12 +01:00
Maxime Coste
5bcb55b6dd
minor cleanups in insert_completer.cc
2014-05-31 18:18:29 +01:00
Maxime Coste
cf03cc97ef
formatting fix
2014-05-31 18:12:54 +01:00
Maxime Coste
9006b31472
remove reverse iterator from SelectionList
2014-05-31 11:56:48 +01:00
Maxime Coste
49ab0c101a
Use forward iteration on selections, and take advantage of it when updating
...
SelectionList::update now is optimized for the common case where changes
are sorted, the algorithm is O(m*n) with m the number of sorted ranges
in the changes. In the common case, m should be very small.
2014-05-29 05:48:40 +01:00
Maxime Coste
72d6ed3575
Add 'n' for number object (inner number does not recognise '.')
2014-05-27 09:50:12 +01:00
Maxime Coste
e1c9e42213
Merge branch 'master' into remove-buffer-change-listener
...
Conflicts:
src/normal.cc
src/selectors.cc
src/selectors.hh
2014-05-27 00:35:12 +01:00
Maxime Coste
9aa38a1ea0
Rename select_whole_.* to just select_.*
2014-05-26 21:44:57 +01:00