Maxime Coste
3c1f606a22
Move some template code out of selectors.hh into selectors.cc
2017-01-01 19:30:02 +00:00
Maxime Coste
35559b65dd
Support codepoints of variable width
...
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes #811
2016-10-01 13:45:00 +01:00
Maxime Coste
fcb37cc754
Pass count to all object selectors
2016-09-26 23:32:07 +01:00
Maxime Coste
fafde8655b
Fix select_to_reverse to correctly handle the first character of the buffer
...
Fixes #809
2016-09-19 09:20:55 +01:00
Maxime Coste
4d13e6fb88
Do not crash whenever S matches the whole selection and hence does not select anything
...
Fixes #787
2016-09-04 11:17:34 +01:00
Maxime Coste
56a7c6e594
Rework buggy number selection function
...
Fixes #765
Fixes #766
2016-08-22 13:54:22 +01:00
Maxime Coste
f51ba6089c
Use variadic macros for kak_assert to remove the need for COMMA
2016-05-17 19:39:55 +01:00
Maxime Coste
abac6a9436
Use boost::wregex implementation and manually utf8 decode into it
...
That way we get proper unicode support in regular expressions as long
as the current locale treats wchar_t as unicode codepoints.
Fixes #638
Fixes #595
Fixes #162
2016-05-10 09:38:21 +01:00
Maxime Coste
25a31534ec
Fix splitting selecting the first buffer char when there is a match at buffer begin
2016-04-30 10:37:31 +01:00
Maxime Coste
9e15181dc9
Rework container helpers, use pipe syntax and cleanup implementation
...
use 'container | filter(func) | reverse() | transform(func)' instead
of 'transform(reverse(filter(container), func), func)' to express
container transformations.
2016-03-08 21:35:56 +00:00
Maxime Coste
f3ec218a1c
Support user given text objects
2016-01-28 19:30:34 +00:00
Maxime Coste
b7530b021a
StringView based surround selection
2016-01-27 19:36:31 +00:00
Maxime Coste
04119d6207
Make find_surrounding more reusable and add unit tests
2016-01-26 07:23:18 +00:00
Maxime Coste
1d748a4017
Pass flags to the regex engine to correct anchors
...
Current behaviour was matching ^ $ for the current search start/end
(and \b was always matching begin/end as well).
Fixes #536
2015-12-23 22:20:25 +00:00
Maxime Coste
f66bbdf209
select/split interpret count parameter as the capture group to use
...
count being 0 by default, we use the whole match, but we can now
specify to use capture 1 with 1s<regex><ret>.
2015-11-26 13:36:26 +00:00
Maxime Coste
12abb54a88
Slightly more performant regex capture gathering in select_all_matches
2015-11-09 08:42:12 +00:00
Maxime Coste
48a296dc71
Avoid an unneeded call to ensure_char_start
2015-11-04 20:10:12 +00:00
Maxime Coste
e82ca36117
Avoid unneeded sort_and_merge_ovelapping call in select_all_matches
2015-11-04 19:43:25 +00:00
Maxime Coste
27571a7716
Refactor utf8::iterator to be on the safe side
...
utf8::iterator now knows the iterator valid range, and pass
it to utf8 functions.
2015-09-23 19:39:21 +01:00
Viktor Palmkvist
1bdaf0675d
Argument text object no longer handles <>
2015-08-25 15:56:49 +02:00
Maxime Coste
58101645ab
Rewrite select_lines and trim_partial_lines
...
Fixes #338 for real (I hope)
2015-07-23 21:03:38 +01:00
Maxime Coste
889bc98866
fix crash in trim_partial_lines
...
Fixes #338
2015-07-23 13:46:20 +01:00
Maxime Coste
12dd7b04ac
Try to simplify argument selector, abandon pair matching checks
...
Recognize both , and ; as argument separator
2015-07-02 13:41:50 +01:00
Maxime Coste
2660793a31
Small refactoring in selectors.cc
2015-07-01 23:54:17 +01:00
Maxime Coste
28ebe776c0
Refactor select_arguments and slightly change behaviour for non-inner
...
non inner argument contains the argument, preceeding whitespaces,
and eventual ending comma, except for first arguments (that
contains the whitespaces after the comma), and last argument (that
contains the comma before it).
2015-07-01 23:47:22 +01:00
Viktor Palmkvist
13d212f445
Added argument text object
2015-07-01 17:42:10 +02:00
Maxime Coste
66866aafd3
Change gl/gh to only move cursor, not selecting (<a-h>/<a-l>) are unchanged
...
That is more consistant with other goto commands (that just move the cursor)
2015-06-08 13:51:06 +01:00
Maxime Coste
7acf3da3ca
Change select_to_eol implementation
2015-06-07 23:17:23 +01:00
Maxime Coste
d2e8bd2431
Fix select_number crashing on empty buffers
2015-04-20 13:55:42 +01:00
Maxime Coste
bf02838816
Remove is_blank, which is identical to is_horizontal_blank
2015-04-15 00:34:00 +01:00
Maxime Coste
bc7c3987e1
Convert CodepointPair to struct MatchingPair
2015-03-04 20:47:14 +00:00
Maxime Coste
18eec7e511
Regex selectors more tolerant to matches not ending on char boundaries
2015-02-02 22:54:05 +00:00
Maxime Coste
da562e03a0
replace all std::vector with Vector
2015-01-12 13:58:41 +00:00
Maxime Coste
955d1dea66
Small formatting fixes
2014-12-29 12:19:16 +00:00
Maxime Coste
3b9f40fd58
Fix split selecting the buffer end
...
Fixes #241
2014-12-17 13:21:20 +00:00
Maxime Coste
b167c11671
Use StringViews for some helper functions in selectors.cc
2014-11-04 13:14:48 +00:00
Maxime Coste
fa85f0fc32
Refactor regex uses, do not reference boost except in regex.hh
2014-10-13 13:14:23 +01:00
Maxime Coste
b097bbbf52
WordDB: Use interned strings pointing directly into the buffer line data
2014-10-07 09:16:19 +01:00
Maxime Coste
fc53a80395
Small refactor
2014-10-01 23:41:06 +01:00
Maxime Coste
dd2bdea8dd
Keep selection direction on split/select/search
2014-09-18 00:34:23 +01:00
Maxime Coste
c18e2ac90e
Target end of line on line selectors
2014-09-09 23:41:32 +01:00
Maxime Coste
42611aef1e
Fix select_number
2014-07-10 19:22:14 +01:00
Maxime Coste
ed68d1ff28
utf8: use end of sequence iterators for more security
2014-07-05 12:10:06 +01:00
Maxime Coste
df3bf7445d
Replace boost::optional with our own implementation
2014-06-27 21:10:09 +01:00
Maxime Coste
fa5b6b716d
Fix crash in paragraph selection
2014-06-14 14:07:21 +01:00
Alex Leferry 2
d5b1605df5
add ' ' for whitespaces object
2014-06-11 20:48:38 +01:00
Maxime Coste
1ffafa8650
Merge branch 'master' into remove-buffer-change-listener
2014-06-06 00:22:46 +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