Maxime Coste
a49ae162f4
Add a -verbatim switch to evaluate-commands for perfect forwarding
...
-verbatim will disable argument parsing in evaluate-commands, making
it possible to forward a single command to a different context without
triggering a reparsing of the arguments.
Fixes -try-client support in grep.kak
Closes #3153
2019-10-23 22:30:23 +11:00
Maxime Coste
362021c1d3
Merge remote-tracking branch 'lenormf/key-semicolon'
2019-10-23 22:10:06 +11:00
Maxime Coste
db2db951c3
Only allow minus at the begining of json numbers
2019-10-23 22:08:07 +11:00
Dan Rosén
c792986768
Teach JSON parser negative numbers
2019-10-22 21:14:38 +02:00
Frank LENORMAND
21614cb06e
src: Create a <semicolon> named key
...
This commit allows using the <semicolon> expansion in commands, instead
of `\;`.
It makes commands look more elegant, and prevents new-comers from
falling into the trap of using <a-;> without escaping the semicolon.
2019-10-22 11:02:06 +02:00
Maxime Coste
3c34de7fe7
Remove explicit sizes from make_array calls
2019-10-17 22:48:22 +11:00
Maxime Coste
dc536da513
Split clang/gcc specific arguments
2019-10-17 12:30:24 +11:00
Maxime Coste
6a893b4e56
Limit word completion menu filename length
2019-10-17 08:15:33 +11:00
Maxime Coste
c7f106a09b
Slight code style change
2019-10-17 08:15:12 +11:00
Maxime Coste
e4fb70ebec
Replace ModeChange hooks by ModePush and ModePop
...
Remove deprecated InsertBegin, InsertEnd, NormalBegin, NormalEnd
hooks.
Closes #2545
2019-10-16 20:45:53 +11:00
Maxime Coste
3a36a2486e
Slight cleanup of the menu display code
2019-10-16 20:45:53 +11:00
Maxime Coste
081595fa2f
Support specifying the user configuration with KAKOUNE_CONFIG_DIR
...
Fixes #3072
Closes #3081
2019-10-10 20:26:27 +11:00
Delapouite
2148b84274
Add unambiguous titles for infobox "enter combining operator"
...
fix #3089
2019-10-10 08:34:36 +02:00
Maxime Coste
a2993ea104
Check that stdin is readable before calling read
...
This should not be necessary, but it works around a bug in WSL.
Fixes #3112
2019-10-08 18:38:05 +11:00
Maxime Coste
2f1be14b5f
Avoid negative initial coordinates
...
Fixes #3111
2019-10-03 21:18:51 +10:00
Maxime Coste
aa6a7e544d
Fix some clang warnings
2019-09-26 20:22:27 +10:00
Maxime Coste
1d9a9bc308
Remove unneeded NCursesUI::Window::mark_dirty and redraws
...
A bug in client.cc was always forcing full redraws of the windows,
leading to much more terminal output traffic than necessary.
2019-09-26 20:14:08 +10:00
Maxime Coste
7f141e83ce
Additional NCursesUI code cleanups
2019-09-25 22:46:39 +10:00
Maxime Coste
2eccbbbe6f
Avoid unnecessary allocations in NCursesUI::Window::draw calls
...
Pass an ArrayView<DisplayAtom> instead of a DisplayLine& so that
the newly common case of passing a single atom does not require
constructing a Vector.
2019-09-25 22:46:39 +10:00
Maxime Coste
f855deaf8b
Refactor NCursesUI::Window to reduce the exposed methods
...
This should make an alternate implementation simpler as less state
has to be tracked.
2019-09-25 22:46:39 +10:00
Maxime Coste
9c2d2ad694
Do not set O_NONBLOCK on stdin
...
It is not necessary, and impacts also writing to stdout, leading
to broken display on old ncurses versions.
Fixes #3087
2019-09-25 20:33:01 +10:00
Maxime Coste
de3ff78b22
Restore stdin status flags on suspend and quit
...
Those flags are shared with the parent process, so the non-block
flag added impacts their execution.
2019-09-24 23:28:11 +10:00
Maxime Coste
f066014d33
Merge remote-tracking branch 'laelath/suppress-init-list-lifetime-warning'
2019-09-22 22:41:25 +10:00
Maxime Coste
df6d0355d6
Add support for parsing SS3 key sequences
...
As discussed on #3087 , fixes part of that issue.
2019-09-22 09:16:47 +10:00
Justin Frank
8094ded9b5
Added -Wno-init-list-lifetime to CXXFLAGS
2019-09-17 13:38:17 -07:00
Maxime Coste
8cca77c949
Accept docstrings with last line not fully indented
...
When trimming indent, the last line, if only containing
whitespaces does not need to match the indent, so that
this indentation style works:
-docstring %{
indented string
}
2019-09-17 21:48:00 +10:00
Maxime Coste
c787128a7c
Restore palette before suspend
2019-09-16 21:57:53 +10:00
Maxime Coste
bfc07b53a2
Correctly restore terminal state on suspend
2019-09-16 07:38:24 +10:00
Maxime Coste
afd5006e8b
Small style tweak
2019-09-16 07:38:24 +10:00
Maxime Coste
9235238191
Fix input coming in packets characters being dropped
2019-09-16 07:38:24 +10:00
Maxime Coste
006083c6f8
Fix multi-client server suspend
2019-09-16 07:38:24 +10:00
Maxime Coste
f43ac3d78b
Fix broken input after suspend
2019-09-16 07:38:24 +10:00
Maxime Coste
e52b93b31a
Setup terminal raw mode without going through ncurses
2019-09-16 07:38:24 +10:00
Maxime Coste
f2f99580f8
Get rid of ncurses based input parsing in favor of custom code
2019-09-16 07:38:24 +10:00
Maxime Coste
fc3a1b6973
Make arrow keys normal mode mappings instead of commands
2019-09-15 19:40:38 +10:00
Maxime Coste
858ae14f76
Allow scrolling while dragging mouse
...
Closes #2052
2019-09-15 10:27:00 +10:00
Maxime Coste
46581f1c65
Fix printing of F12 key
2019-09-08 22:54:41 +10:00
Jean-Louis Fuchs
9d897a6092
Rank a word-boundary after a non-word-boundary
2019-09-07 22:53:29 +02:00
Maxime Coste
a440869573
Fix modifiers support with mouse events
2019-09-07 22:49:30 +10:00
Maxime Coste
04b5d44b3c
Rework custom CSI parsing code and add support for SGR (1006) mouse
...
This will support parsing mouse coordinates bigger than 255 - 32.
And get correct release support.
2019-09-07 22:29:05 +10:00
Maxime Coste
4cc187a54f
Remove unneeded uses of NCurses WINDOW*
...
intrflush and meta have a WINDOW* parameter that is documented as
always ignored.
2019-09-05 00:25:27 +10:00
Maxime Coste
afd45c6755
Extract most ncurses calls into NCursesUI::Window methods
...
Try to isolate ncurses as much as possible to explore alternate
terminal UI implementation.
2019-09-05 00:25:27 +10:00
Maxime Coste
4c4eb61c18
Introduce FunctionRef to replace std::function when not storing
...
std::function is not necessary when we just want to pass a type
erased callback that does not need to own its target. FunctionRef
provides that functionality for a much lower compile time cost.
2019-09-01 13:04:47 +10:00
Maxime Coste
b24be99fa3
Limit the amounts of calls to get_extra_word_chars
...
This is a relatively expensive function as it needs to resolve
an option, which uses dynamic_cast.
2019-08-31 13:14:46 +10:00
Maxime Coste
eeec8ade51
Merge remote-tracking branch 'eraserhd/pr/master/fix-kak-list-sessions'
2019-08-28 21:27:30 +10:00
Frank LENORMAND
cb2647878b
src: Send the stop signal to the entire process group
...
Whenever a tool spawns the editor (e.g. Git), suspending it with ^Z is not
enough to be sent back to the calling shell - another ^Z is necessary.
Fixes #3061
2019-08-21 10:32:35 +02:00
Jason Felice
8d76603df4
Fix kak -l when $XDG_RUNTIME_DIR is set
2019-08-20 16:13:21 -04:00
Maxime Coste
1f4b6c3f78
Merge remote-tracking branch 'lenormf/indented-docstrings'
2019-08-19 22:21:52 +10:00
Maxime Coste
2359df0f17
Make scrolling speed configurable
...
The UI now can send a 'Scroll' key, whose value is the scrolling
amount encoded as a signed integer. This replaces the MouseWheelUp
and MouseWheelDown keys.
The NCursesUI now has a ncurses_wheel_scroll_amount ui_option that
controls that amount, it can be negative to swap scrolling direction.
Fixes #3045
2019-08-19 22:16:39 +10:00
Maxime Coste
f1047181cb
Fallback to wrapping in between 'word' when 'WORD' fails
...
First try to break at a whitespace, if that fails (likely because
that last WORD is too long for the wrapping width), then try to
wrap at a 'word' boundary (on a non alphanumeric character).
Fixes #3048
2019-08-12 18:40:56 +10:00