Maxime Coste
f6f2dafaf7
Make set -add replace existing value when applied to a map option
2018-03-30 09:26:39 +11:00
Delapouite
7f3a308b60
Add status message when commiting an undo group in insert mode
2018-03-29 22:54:03 +02:00
Maxime Coste
fab3dc642a
Merge remote-tracking branch 'Delapouite/on-key'
2018-03-28 21:41:17 +11:00
Maxime Coste
ebc700ee17
Fix uninitialized m_empty_text StringView in LineEditor
2018-03-28 20:48:50 +11:00
Delapouite
1b7b3fea09
Fix typo in on-key command description
2018-03-28 07:33:43 +02:00
Maxime Coste
1f6c2b87ff
Support count in <a-s> to split on groups of n lines
...
Fixes #1966
2018-03-27 22:33:58 +11:00
Maxime Coste
e8093a12a0
Simplify command debug code
2018-03-27 08:25:47 +11:00
Maxime Coste
0a833371ab
Prompt: Do not call callback in on_enabled
...
Schedule it for later, when we get "idle". It currently can lead to
crashed because after the callback, the current mode might be different,
leading to a crash when doing the ModeChange hook call.
2018-03-27 07:40:44 +11:00
Maxime Coste
3d3a37a80c
Fix 'O' not putting the cursor on the correct line
2018-03-27 07:28:25 +11:00
Maxime Coste
253790be51
Formatting fix
2018-03-26 19:50:51 +11:00
Maxime Coste
5ba27c18a4
Fix operator priority order error
2018-03-26 19:19:47 +11:00
Maxime Coste
59c883d02f
Avoid visiting the same directory multiple times in insert filename completion
2018-03-25 20:28:26 +11:00
Maxime Coste
6d3fe30bf6
Allow explicit filename completion with empty prefix
2018-03-25 19:03:54 +11:00
Maxime Coste
a6b1d142fa
Cleanup client name validation code
2018-03-25 16:53:27 +11:00
Maxime Coste
49c52b025f
Remove contains_that and use any_of to be closer to the c++ stdlib
2018-03-25 16:47:19 +11:00
Maxime Coste
435b5b7ff9
Unify code that validates identifiers in Kakoune
...
Session/Client/User modes names are now requiered to be "identifiers"
they must be in [a-zA-Z0-9_-]. Option names are the same except they
do not allow '-' as they need to be made available through the env vars
and '-' is not supported there.
Fixes #1946
2018-03-25 16:35:33 +11:00
Maxime Coste
beb2cef7f9
Document rotate selection breaking change in startup message
2018-03-25 11:39:26 +11:00
Maxime Coste
ec7f3738ee
Move rotate selection and rotate selection contents to ) and <a-)>
...
Backward rotation are supported with (.
Fixes #1210
2018-03-25 11:39:26 +11:00
Maxime Coste
683ce8e83b
Use 1 and -1 for Forward/Backward Direction to simplify code
2018-03-25 11:25:55 +11:00
Maxime Coste
59e9108812
indent selector: When line is empty, find indent from surrounding lines
...
Look for the first non empty line preceeding the current line, or
if not found, the first non empty line following it.
Fixes #1904
2018-03-25 10:25:56 +11:00
Maxime Coste
81f605709c
Remove parse_filename overload and use a default parameter
2018-03-25 07:55:39 +11:00
Maxime Coste
a732037b53
Support %
in path
option to mean current buffer directory
...
In the end, % is not that painful to work with as its only set seldomly,
and we usually dont need to use expansion at the same time. Moreover, it
just requires a single \ to be escaped.
Fixes #1562
2018-03-23 08:22:34 +11:00
Maxime Coste
db7b43acd5
Restore client name after converting to client
...
When Kakoune forked the sever to background, the newly converted
to client process (the original client/server process) was not
preserving its previous client name.
2018-03-23 07:36:18 +11:00
Maxime Coste
1cdeace128
Merge remote-tracking branch 'Delapouite/doc-commands'
2018-03-21 06:42:31 +11:00
Maxime Coste
5c1a5c6d15
Revert "Throw when trying to remove a child highlighter that does not exists"
...
This reverts commit 56237aa8f8
.
Throwing seems more correct, but it breaks lots of existing scripts.
reverting for now until we have a nice solution.
2018-03-20 20:11:15 +11:00
Delapouite
00cb49438a
Docs: add missing [<switches>] in commands signatures
2018-03-20 09:13:09 +01:00
Maxime Coste
bec849ae14
Tolerate empty filenames in real_path
2018-03-20 05:56:20 +11:00
Maxime Coste
f7f84b7402
NCursesUI: Rework menu_show to shrink menu height when needed
...
Closes #1886
2018-03-20 05:54:19 +11:00
Maxime Coste
826977eb1b
Fix remove of highlighters with trailing / in their name
...
Fixes #1914
2018-03-20 05:35:37 +11:00
Maxime Coste
56237aa8f8
Throw when trying to remove a child highlighter that does not exists
2018-03-20 05:35:15 +11:00
Maxime Coste
b27d4afa8d
Regex: Only allow SyntaxCharacter and - to be escaped in a character class
...
Letting any character to be escaped is error prone as it looks like
\l could mean [:lower:] (as it used to with boost) when it only means
literal l.
Fix the haskell.kak file as well.
Fixes #1945
2018-03-20 04:57:47 +11:00
Maxime Coste
6e695e37be
Fix real_path again
2018-03-19 20:49:05 +11:00
Maxime Coste
6d8747b886
Fix introduced bug in real_path
2018-03-19 06:28:06 +11:00
Maxime Coste
9518f279fb
Tweak option documentation helper to support -add
...
Fixes #1939
2018-03-19 03:04:50 +11:00
Maxime Coste
8a7e844207
NCursesUI: refactor info_show code
...
Show MenuDoc info on the left of the menu if necessary. Cleanup the
code.
2018-03-19 01:23:32 +11:00
Maxime Coste
cf37623f1a
Refactor read_fd '\r' removal logic
2018-03-18 23:43:18 +11:00
Maxime Coste
ac91a79b12
Fix implementation of real_path to handle non-existing directories in /
...
Fixes #1937
2018-03-18 23:23:00 +11:00
Maxime Coste
7ba4ef897b
Fix crash on expanding command line strings
2018-03-18 04:58:15 +11:00
Maxime Coste
0a2807e652
RangesHighlighter: a range that goes up to buffer end is not valid
2018-03-16 23:25:37 +11:00
Maxime Coste
08df409a53
RankedMatch: Do not compare word boundary match count on single word matches
...
As the computation of word boundary matches is separate from the
actual subsequence matching, we sometimes have candidate that match
as a single word while still having multiple word boundary matches.
For example, with query "expresins", candidate "expressionism's"
will match as single word ("expressins" is a subsequence of
"expressionism"), and will have two word boundaries match (it does
match the last "s", which is considered as a separate word).
This should not be taken into account when compared against
candidate "expresions", which should be considered a better
match.
Fixes #1925
2018-03-15 23:20:03 +11:00
Maxime Coste
6f2b093eec
NCursesUI: Show full menu rather than triming to respect anchor
2018-03-13 15:18:06 +11:00
Maxime Coste
a480e566dc
ranges: Add transform overload taking directly a pointer to member
...
This overload will forward to the general transform implementation
using std::mem_fn to generate a callable.
2018-03-13 14:24:03 +11:00
Maxime Coste
c82bf31378
NCursesUI: Use accumulate algorithm to gather the longest element in menu
2018-03-13 14:14:16 +11:00
Maxime Coste
bfaf52f8c0
Do not jump to buffer start on g.
with no previous modifications
2018-03-13 14:00:57 +11:00
Delapouite
d5d23834f6
Handle hyphens in user-mode names
...
Fix #1921
2018-03-11 14:58:53 +01:00
Maxime Coste
e66073bc94
Detect infinit recursion in reference highlighting
...
Reference highlighters allow for potential mutual recursion between
highlighters. This is usually fine, but if the recursion happens on
the same buffer range, it means we will recurse infinitely.
Fixes #1920
2018-03-11 11:44:10 +11:00
Maxime Coste
4584ecac77
Move WORD text object to <a-w>
...
It improves consistency and it looked like there was support for that
change on github.
Fixes #1861
2018-03-10 00:25:19 +11:00
Maxime Coste
f801d0064a
Merge remote-tracking branch 'Delapouite/hls'
2018-03-10 00:07:03 +11:00
Maxime Coste
9125b01fa8
Detect no-op replaces and do not act on them
...
This avoids recording no-op undo groups.
2018-03-09 23:07:05 +11:00
Delapouite
abc2d28570
Docs: extend explanations about line_flags, ranges and replace-ranges
2018-03-06 12:15:55 +01:00