| Age | Commit message (Collapse) | Author |
|
Fixes #3985
|
|
This prints all non-empty registers and their value(s) to the `*debug*`
buffer.
|
|
|
|
When the `kill` command is called in the `-E` CLI flag, the resulting
exception is not caught and crashes the server.
This commit allows the server to terminate cleanly.
Since `KakEnd` hooks also need to be executed should the user run a
command like `kak -E 'kill 0'`, the execution of `KakBegin` hooks is
now performed *before* the command provided in `-E` is executed. The
documentation for `KakBegin` (executed after the `-E` command prior to
this commit) consequently becomes more truthful, as it states:
KakBegin session name
kakoune has started, this hook is called just after
reading the user configuration files
Fixes #3972
|
|
|
|
Add that libexec directory to the PATH instead of the current kak
binary directory to avoid impacting other commands.
The libexec directory currently only contains a symlink back to
the Kakoune binary.
|
|
|
|
This makes it possible to use the mechanism introduced by 91386a53
|
|
This can be an issue with NextKey that now does not have a static
mode name.
|
|
Various paths can run arbitrary commands (callbacks, hooks) which
could lead to the InputMode being popped off the mode stack, but
contrarily to the on_key method, we had no guarantees to be kept
alive.
Add a keep_alive RefPtr to this to ensure the mode survives till
the end.
Fixes #3915
|
|
|
|
When doing line completion, we previously used to not complete the line
if it had different indent to the potential completion.
This commit changes the behaviour to ignore indentation when completing lines.
|
|
Fixes #3849 Again
|
|
Unfortunately this breaks some pretty useful use cases, such as inserting a
command ending with a new-line (as it now leads to an addtional command being
auto-completed on validation)
This reverts commit aab0be529f77f3a8e86185a030838e6d547d0286.
|
|
|
|
When pasting many words with <a-p> we can end-up with a huge
concatenated word and many selections, the previous code ended
up iterating from each selection cursor to that word start and
end to find the word under the cursor.
This could lead to performance issue as each selection would
trigger iteration on that huge word. This is unnecessary as
word completion has a word length limit, so we now take it into
account to avoid iterating to far from the cursor position.
|
|
The previous code was advancing from the general insertion point
for all selection, instead of iterating only once from insertion
point until the end of inserted text.
|
|
0 means stdin was closed, this is quite unexpected as we would usually
get a SIGHUP, but it looks like in some rare case this happens and
it leads to an infinite loop trying to handle stdin events (as it
will always be readable from now on).
Fixes #3557
|
|
Previously we would only auto-insert if the current token had some
text, but this breaks auto-selection of the first match.
Fixes #3849
|
|
Previously, Kakoune only handled ctrl-codes less than 27, representing them as
lower-case ASCII codes. For regular keys like <c-a>, that worked fine. However,
NUL became the unorthodox <c-`> and other ctrl-symbols (<c-\>, <c-]>, <c-_>)
weren't supported at all.
Now NUL is rendered as the more comfortable <c-space>, and the other ctrl-symbol
codes are properly decoded.
Fixes #2553.
|
|
`-atomic` becomes `-method replace` and `-method overwrite` is now
supported explicitely instead of only available through the
writemethod option.
Fixes #3827
|
|
Giving an explicit register uses its content for the default value
to use if the user does not enter anything. This enables:
`set-register a %{commands}; execute-keys '"a:<ret>'`
`set-register a %{shell script}; execute-keys '"a|<ret>'`
...
This provides a nice way to avoid the need to escape keys to use
those normal mode commands.
Fixes #3825
|
|
This avoids a frustrating behaviour where Kakoune autoinserts the first
command name when hitting <space> after a ; in a command line. It also
fixes the empty prompt case that was auto-completed instead of executing
the default command.
|
|
|
|
We try to detect when compiling under Cygwin, so we can set the
_XOPEN_SOURCE define which lets us use wcwidth(). We look for the
string "CYGWIN" in the uname, which looks like:
CYGWIN_NT-10.0
MSYS2 is also based on Cygwin, so all of the above should still work.
However, we detect Cygwin by looking for the string "CYGWIN" in the
uname. In MSYS2, the uname looks like:
MSYS_NT-10.0-18362
This patch looks for the string "_NT" instead of the string "CYGWIN"
in the uname, since it's common to both environments. This fixes a
compilation error on MSYS2.
|
|
The menu flag signifies that only the completions are valid arguments,
hence it makes sense to auto insert the best one on space.
Because full match is always considered the best match in completion
ranking, this should always have a reasonable behaviour.
This makes it harder to enter a hidden command, but completion can
always be disabled via <c-o> or by quoting in those rare cases.
|
|
Because the server will out-live that client's disconnection it
is still ok to have modified buffers, the server will complain
on `kill`.
Fixes #3801
|
|
Closes #3789
|
|
|
|
|
|
|
|
Because no flags were set for regex matching, the regex engine was
assuming that the subject string past-the-end matched a end-of-line.
As the subject string already ended with a \n character, the regex
engine processing of the "past-the-end" position would match '^$'
as ^ matched past the existing \n and $ matched the assumed
end-of-line.
Fixes #3799
|
|
|
|
We were creating selections from default constructed iterators,
which happened to have 0,0 coords and led to out-of-order selection
lists.
Fixes #3757
|
|
|
|
`set -remove ...` will remove from the current option value, substracting
from int, removing elements from vectors and maps.
|
|
|
|
Previously we would just bypass that hook making it impossible to
act on the inserted text when triggering an explicit completion after
inserting text from the previous completer.
|
|
Previously a `F` attribute would end up being converted to Ffga which
is confusing as F *means* fga.
|
|
They were getting out-of-sync with the stored timestamp, leading
to invalid ranges being computed and crashes.
Fixes #3666
Fixes #3571
|
|
Leave that to the shell or external service management tools
Fixes #3618
|
|
Matches the user facing name and seems more correct.
|
|
|
|
|
|
|
|
Part of #795
|
|
Part of #795
|
|
Fixes #3635
|
|
|
|
This greatly reduces the amount of hooks triggered.
|