Commit Graph

5929 Commits

Author SHA1 Message Date
Maxime Coste
2f48bbf6ff Tweak unescape template function to unescape the escape char as well
Test that more thouroughly in the unit tests.
2017-12-07 01:56:02 +08:00
Maxime Coste
99636c6230 Remove Vector returning split functions, use range adaptor
Do not allocate temporary vectors to store splitted data, use the
'split' range adaptor along with transform(unescape) to provide the
same feature with less allocations.
2017-12-06 17:18:44 +08:00
Maxime Coste
1b44056fce man.kak: Better support for renaming a man buffer
Fixes #1718
2017-12-06 14:49:38 +08:00
Maxime Coste
70e2122ae6 InsertCompleter: only accept words matching the target buffer word definition
The words we store in the WordDB are dependent on the extra_word_chars
options, which can be different for different buffers. When completing
words in a buffer based on the WordDB from another buffer, some candidates
might contains characters that are not considered word character for
the target buffer, ignore those words.
2017-12-06 14:15:36 +08:00
Maxime Coste
a9f1a23f35 man.kak: use shell-candidates instead of shell-completions 2017-12-06 14:10:10 +08:00
Maxime Coste
86fcc55e53 RankedMatch: Make punctuation ordered *before* alphanumeric characters 2017-12-06 13:58:34 +08:00
Maxime Coste
363a0c3a0d man.kak: Fix behaviour when called with no params with Posix shells
Seems dash nevers falls back for ${@-$blah}, it does not considers $@
to be empty. Use ${1-$blah} instead as we never have more than one
parameter.
2017-12-06 13:23:39 +08:00
Maxime Coste
936b95ac34 Ensure that normal mode restores disabled hook status on disabled
Fixes #1744
2017-12-06 12:59:31 +08:00
Maxime Coste
274367116a Replace uses of getpwuid which is incompatible with static linking
Introduce a get_user_name function which parses '/etc/passwd' to find
the username associated with a user id.
2017-12-04 15:19:57 +08:00
Maxime Coste
7d32b3fc36 Merge remote-tracking branch 'Qeole/master' 2017-12-03 18:14:32 +08:00
Maxime Coste
23fdb914bf Merge remote-tracking branch 'lenormf/fix-dockerfile' 2017-12-03 18:13:39 +08:00
Maxime Coste
c83f7d5b1e Merge remote-tracking branch 'lenormf/nim-support' 2017-12-03 18:13:30 +08:00
Maxime Coste
35d2b2b4bc c-family.kak: Use regex custom text object to simplify some indent 2017-12-03 17:48:04 +08:00
Maxime Coste
1a38849086 c-family.kak: indent after parenthesis at end of line 2017-12-03 17:47:44 +08:00
Maxime Coste
73a239d3be Text-Objects: Use regex to select surroundings
Fixes #925
2017-12-03 17:15:24 +08:00
Maxime Coste
c8f5935c48 test/: Add more tests for object selection corner cases 2017-12-03 17:12:33 +08:00
Maxime Coste
1371148588 test: fix support for '(' in initial selected text 2017-12-03 17:12:33 +08:00
Maxime Coste
9a4b5de772 Regex: Introduce backward_regex_search helper function 2017-12-03 17:12:33 +08:00
Maxime Coste
b34bb6b794 Regex: make RegexIterator iterable and able to iter backwards 2017-12-02 14:02:41 +08:00
Frank LENORMAND
f3238f4e65 rc dockerfile: Remove a left-over debug instruction 2017-12-01 17:12:41 +03:00
Maxime Coste
413f880e9e Regex: Support forward and backward matching code in the same CompiledRegex
No need to have two separate regexes to handle forward and backward
matching, just passing RegexCompileFlags::Backward will add support
for backward matching to the regex. For backward only regex, pass
RegexCompileFlags::NoForward as well to disable generation of
forward matching code.
2017-12-01 19:57:02 +08:00
Maxime Coste
e9e3dc862c Merge git://github.com/valerdi/kakoune 2017-12-01 16:40:31 +08:00
Maxime Coste
90c91ca3a2 Merge remote-tracking branch 'lenormf/fix-dockerfile' 2017-12-01 16:39:50 +08:00
Maxime Coste
7bfb695c45 Regex: Do not allow private use codepoints literals
We use them to encode non-literals in lookarounds, so they can
trigger bugs.

Fixes #1737
2017-12-01 16:37:18 +08:00
Maxime Coste
8d892eeb62 Regex: use StartDesc to early out when not searching
Early out as well if we do not find any potential start position.
2017-12-01 15:03:03 +08:00
Maxime Coste
65b057f261 Regex: rename StartChars to StartDesc
It only contains chars for now, but its still more generally
describing where matches can start.
2017-12-01 14:46:18 +08:00
valerdi
4d4c6aa82b
added AbstractString to keywords 2017-11-30 15:44:12 +01:00
Maxime Coste
b91f43b031 Regex: optimize parsing a bit 2017-11-30 14:32:29 +08:00
Maxime Coste
c1f0efa3f4 Regex: smarter handling of start chars computation for character class 2017-11-30 14:19:41 +08:00
Qeole
a54b6129de README: minor fixes
- `make doc` does not work, users should use `make man` instead.
- Fix a formatting mistake: escape a back quote.
2017-11-29 22:17:41 +00:00
Qeole
57b3ecb684 Qeole Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2017-11-29 22:17:41 +00:00
Frank LENORMAND
e102251880 rc: Implement basic Nim support 2017-11-29 19:15:00 +03:00
Maxime Coste
839da764e7 Regex: avoid unneeded allocations and moves by reusing MatchResults storage 2017-11-29 14:07:04 +08:00
Maxime Coste
f950fe3376 hooks.asciidoc: Fix few rendering problems 2017-11-28 19:40:07 +08:00
Maxime Coste
380ff553b5 Wrap: try to rework and simplify the algorithms further
Fixes #1731
2017-11-28 19:04:21 +08:00
Maxime Coste
ae0911b533 Regex: Various small code tweaks 2017-11-28 01:03:54 +08:00
Maxime Coste
4598832ed5 Regex: optimize compilation by reserving data 2017-11-28 00:59:57 +08:00
Maxime Coste
a52da6fe34 Regex: Tweak is_ctype implementation style 2017-11-28 00:13:42 +08:00
Maxime Coste
d142db80f2 Fix compute_modified_ranges corner case that would crash on undo
Fixes #1506
Fixes #1215
2017-11-27 20:29:01 +08:00
Maxime Coste
40352aed9d Merge remote-tracking branch 'Delapouite/advance' 2017-11-27 16:53:41 +08:00
Delapouite
9c5fa1d68b Docs: fix typo avance → advance in keys 2017-11-25 17:18:12 +01:00
Maxime Coste
8b40f57145 Regex: Replace generic 'Matchers' with specialized functionality
Introduce CharacterClass and CharacterType Regex Op, and optimize
their evaluation.
2017-11-25 18:14:15 +08:00
Maxime Coste
0d44cf9591 Regex: do not decode utf8 in accept calls as they always run on ascii 2017-11-25 18:13:27 +08:00
Maxime Coste
ec6ecd5772 Add an InsertCompletionSelect hook
InsertCompletionSelect will be called whenever the selected insert
completion changes. If the original text is selected back, the hook
parameter will be empty. If another candidate is selected, the hook
parameter will be its text content.

Fixes #1676
2017-11-25 13:57:47 +08:00
Maxime Coste
1ae96c977c Small formating tweak 2017-11-25 13:46:55 +08:00
Maxime Coste
318e77b25e Highlighters: Introduce unique highlighter support
Some highlighters, such as wrap or line numbers, are not intended
to be used multiple times on the same display. Add support for unique
ids that are used by highlighters to disable themselves if another
unique highlighter with the same id is supposed to override them.

The usual highlighter "precedence" takes, place, that it, that most
nested highlighter will the the one to run (window in priority to
buffer in priority to global).
2017-11-25 12:53:33 +08:00
Delapouite
66250a06eb Rename KeyMapInfo → KeymapInfo 2017-11-24 10:34:56 +01:00
Maxime Coste
6084490a6e Merge remote-tracking branch 'Delapouite/remaining-buffers' 2017-11-24 16:37:53 +08:00
Maxime Coste
5a0332ac87 Window: fix buffer_coord when a line buffer range is empty
Fixes #1711
2017-11-24 16:36:37 +08:00
Maxime Coste
74b0c98769 Merge remote-tracking branch 'occivink/comment' 2017-11-24 16:29:30 +08:00