Add a UserInterface::is_ok method and return false on
SIGHUP/stdin closing/socket dropping
This should be cleaner and more robust than the previous SIGHUP
handling code.
Fixes#1594
If the local client was quitted during its creation (using -e quit
for example), we could have been accessing a null pointer afterwards.
Make the rest of the code aware that local_client might be null.
Shifted function keys are not well standardized around terminals,
Shift F(N) usually returns F(X) + N, with X=12 on xterm, X=10 on
rxvt-unicode... Default to X=12 and make it configuable through
the ncurses_shift_function_key ui_option.
This fixes what #1898 tried to.
Because keyboard layouts vary, the shift-modifier `<s-…>` is only supported
for special keys (like `<up>` and `<home>`) and for ASCII lowercase where
we assume the shift-modifier just produces the matching uppercase character.
Even that's not universally true, since in Turkish `i` and `I` are not an
uppercase/lowercase pair, but Kakoune's default keyboard mappings already
assume en-US mappings for mnemonic purposes.
Mappings of the form `<s-x>` are normalized to `<X>` when `x` is an ASCII
character. `<backtab>` is removed, since we can now say `<s-tab>`.
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.
colorscheme apply on global scope, which should be good enough for
now.
Fixes#1411
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
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.
Stripping whitespaces there is a failed experiment as it breaks the
ability to use multi-selections consistently: Using '*' followed by some
`N` to add following matches, we end up with mismatched selections
due to whitespace stripping the original selection still contains
whitespaces where all the new ones do not. Once we get to this state,
most selection commands will give different results for the initial
selection and the other ones, breaking predictible multiselection use,
one of the cornerstones of Kakoune editing model.
Handle next event should never block if we have already accumulated
input that we want to process. As we can accumulate new input in
lots of places (everytime we run a shell process for example, we
might end up reading input keys. That can be triggered during the
mode line generation which takes place during display of the window)
Fixes#1804
Makes it easier for users who want to locate their kakrc file, and
does not require to go through shell expansion to get it as
"${XDG_CONFIG_DIR:-${HOME}/.config}/kak"
Fixes#1740
Avoid losing the whole session when closing the terminal emulator of
the client/server process, only the client will be removed and the
server will be forked.