Maxime Coste
aad20f6576
Merge remote-tracking branch 'krobelus/paragraph-begin-oob'
2020-05-19 19:17:03 +10:00
Maxime Coste
af175d2e7e
Output debug memory stats in a nice table
2020-05-19 17:16:37 +10:00
Johannes Altmanninger
fc63eef695
Fix crash when selecting previous paragraph at buffer begin
...
Fixes #3489
When there are multiple empty lines between a paragraph and the cursor
(C in the example below), <a-[>p skips over one of them. Prevent the
check for the extra newline from going out of bounds.
```
a paragraph
C after <a-[>p, the first two lines will be selected
```
2020-05-17 14:15:48 +02:00
Johannes Altmanninger
08509cb408
Refactor: use is_eol() as elsewhere in this function
2020-05-17 14:11:45 +02:00
Maxime Coste
5fd548d5cf
Fix use of unportable MSG_CMSG_CLOEXEC
2020-05-17 21:28:40 +10:00
Maxime Coste
151eb3299d
Fix CSI u parsing of some special keys
2020-05-12 08:50:27 +10:00
Maxime Coste
60154300f9
Support piping data to client stdin
...
Pass the client stdin fd to the server and open a fifo buffer
from it.
Fixes #3394
2020-05-10 19:30:13 +10:00
Maxime Coste
2104af0771
Fix select_sentence going past the end of the buffer
...
Fixes #3472
2020-05-10 15:13:15 +10:00
Maxime Coste
f4efde7e08
Merge remote-tracking branch 'krobelus/kak-c-initial-buffer-pos'
2020-05-03 13:20:44 +10:00
Maxime Coste
2fca4e5643
Fix traling whitespaces
2020-05-02 13:02:10 +10:00
Maxime Coste
ccecd5bd8e
Add support for alpha channel in colors
...
This makes it easier to define faces that lighten/darken whatever
they apply on.
2020-05-02 12:57:36 +10:00
Johannes Altmanninger
c010f14a7c
Fix +line:col initial buffer position when connecting to session
...
A command line argument like +line[:column] can be used to specify a
target line and column for the first file.
This did not work when connecting to a session, because the client
opens its file parameter with `-e "edit file1; edit file2"` which is
executed after the initial buffer position is set. Work around this by
passing the position to the first file and avoid moving the cursor
in unrelated files.
Reproduce:
kak -s foo
kak -c foo +4:11 README.asciidoc
2020-05-01 10:05:37 +02:00
Maxime Coste
ceff2286af
Fix clang compilation
2020-04-27 17:41:09 +10:00
Maxime Coste
35e8e12b12
Merge branch 'netbsd-1' of https://github.com/krytarowski/kakoune
2020-04-27 17:40:33 +10:00
Maxime Coste
954373d3cf
Support multi-line replace-ranges
...
This likely has lots of rough edges, but should be an initial proof
of concept to support folding.
2020-04-27 17:39:21 +10:00
Maxime Coste
cb119251bc
Do not replace partially selected ranges in replace-ranges highlighter
...
Partially selected ranges should not be replaced to make it possible
to see what is actually selected.
2020-04-27 17:39:21 +10:00
Maxime Coste
0fdfbdfd15
Fix highlighting empty ranges at end of line and begin of line
2020-04-27 14:31:26 +10:00
Maxime Coste
fde4c60dd9
Factor option based highlighters
2020-04-27 14:31:26 +10:00
Kamil Rytarowski
22931bdc1f
Fix get_kak_binary_path() for NetBSD
...
Pass correct mib[] to sysctl(3).
2020-04-23 03:24:24 +02:00
Maxime Coste
a33b938652
Fix issue with select object and empty matches
2020-04-21 13:21:35 +10:00
Maxime Coste
562ee6143a
Parse ascii newline/tab/escape as special keys instead of control keys
...
Fixes #3439
2020-04-13 12:44:15 +10:00
Maxime Coste
8000cd092f
Fix internal command naming
2020-04-13 12:24:45 +10:00
Maxime Coste
91e3a58a3a
Merge remote-tracking branch 'lenormf/fix-3410'
2020-04-13 11:09:08 +10:00
Maxime Coste
0fb479f0c2
Merge branch 'netbsd' of http://github.com/niacat/kakoune
2020-04-09 07:42:53 +10:00
Maxime Coste
f7a2ecfacb
Support empty ranges in replace-ranges highlighter
2020-04-06 11:23:47 +10:00
Maxime Coste
c585107ab5
Add -override support to add-highlighter
...
This allow replacing a highlighter in place, not loosing its current
position in its parent.
Fixes #3436
2020-03-30 21:04:01 +11:00
Maxime Coste
b42885ef71
Fix empty strings not being zero terminated
2020-03-29 20:28:56 +11:00
Maxime Coste
8f30e37507
Untie focus reporting and mouse handling
2020-03-27 07:54:21 +11:00
nia
7d4a83a449
|| -> or for consistency
2020-03-22 11:00:27 +00:00
nia
28982aae92
Fix build on NetBSD
2020-03-22 10:49:06 +00:00
Maxime Coste
3c265acd6c
Remove posB from information given by the diff algorithm
...
posB is always the sum of previous add len and previous keep len,
so very easy to keep track of.
2020-03-20 20:27:50 +11:00
Maxime Coste
401ef84a4b
Remove uses of reverse_iterator in diff implementation
2020-03-20 20:24:42 +11:00
Frank LENORMAND
07d702e419
src: Fix a compilation bug with g++-8
...
The Ubuntu Disco distribution comes with `g++` v8 installed by default,
which is not able to deduce the return type of a particular call to
`transform()`.
This commit explicitly declares the return type to mitigate that
problem, and allow the file to compile.
Fixes #3410
2020-03-17 09:00:29 +03:00
Maxime Coste
1b28a19058
Merge remote-tracking branch 'Anfid/scroll-test'
2020-03-15 12:32:54 +11:00
Maxime Coste
09375edf54
Merge remote-tracking branch 'occivink/arrange-buffers'
2020-03-15 12:18:04 +11:00
Maxime Coste
7545fa58ae
Fix invalid access to deleted line when updating insert completion
...
The computation of the completion end position was taking place too
early, before we checked if the buffer did get modified.
Fixes #3349
2020-03-14 13:49:52 +11:00
Maxime Coste
31caae20eb
Allow reading from fifo in readonly buffers
...
readonly is supposed to prevent the user from modifying the buffer
and it can be useful to generate a readonly fifo buffer.
Fixes #3398
2020-03-14 12:58:22 +11:00
Maxime Coste
8c2ef4965a
Merge remote-tracking branch 'lenormf/fix-completion-escaping'
2020-03-13 08:08:17 +11:00
Maxime Coste
83a17227a5
Merge remote-tracking branch 'lenormf/fix-Makefile-compiler-string'
2020-03-13 08:06:42 +11:00
Maxime Coste
a53d501f7b
Merge remote-tracking branch 'lenormf/fix-3399'
2020-03-13 08:05:04 +11:00
Maxime Coste
149da2064d
Handle invalid utf8 in command line a bit better
...
Reduce the amount of decoding by working directly on
bytes.
Fixes #3388
2020-03-13 08:02:58 +11:00
Frank LENORMAND
7b28e68d6c
src: Don't escape completion candidates with \
...
Completion candidates are currently escaped with a backslash `\`
character, which leads to ugly interactive commands on the prompt,
especially when they contain space characters.
This commit makes completion candidates be escaped by simple quoting.
Examples:
candidate\ with\ spaces
\%opt{foo}
\"dquote
\'quote
become:
'candidate with spaces'
'%opt{foo}'
'"dquote'
'''quote'
2020-03-12 22:24:44 +03:00
Frank LENORMAND
789caf89a3
rc Makefile: Fix the predicate to detect g++
...
Some distributions replace the expected "GCC" tag with their own name
and version, causing the Makefile not to include a compiler flag.
2020-03-12 17:04:34 +03:00
Joachim Henke
3881dc1e7a
restore F1 key handling
2020-03-04 09:06:46 +01:00
Maxime Coste
610be9ac20
Fix invalid memory access in unit-tests
2020-03-04 12:08:16 +11:00
Maxime Coste
e3a5856284
Only replace chars >= 0 in fix_atom_text
...
If char is signed, the test was invalid
Fixes #3389
2020-03-03 20:16:31 +11:00
Maxime Coste
7a9292be58
Merge remote-tracking branch '6112/clippy-delay'
2020-03-03 07:49:02 +11:00
Maxime Coste
0a66eb9c47
Expand env vars as list of strings
...
This makes it possible to do :select `%val{selections_decs}` and to
correctly combine $kak_quoted with those.
2020-03-02 20:53:28 +11:00
Nicolas Ouellet-Payeur
10d887583f
Make on_next_key_with_autoinfo()
respect idle_timeout
...
The prompt and autocomplete normally wait for `idle_timeout` before showing
suggestions, however commands like `g`, `v`, or the lead-key show Clippy
instantly.
This fixes the issue by making `on_next_key_with_autoinfo()` wait for
`idle_timeout` before displaying suggestions.
Fixes mawww/kakoune#3365
Fixes mawww/kakoune#2066
2020-02-27 10:36:15 -05:00
Maxime Coste
b8eef27e04
Enable terminal application keypad mode
2020-02-26 17:45:52 +11:00
Maxime Coste
af6885c0c9
Control character end at 0x1F
2020-02-26 07:59:05 +11:00
Maxime Coste
df844c6243
Do not replace spaces in prompt text
2020-02-25 20:09:25 +11:00
Olivier Perret
5c116ab850
Add a new 'arrange-buffers' to let users change the order of the buflist
2020-02-24 09:41:46 +01:00
Maxime Coste
93a889bd44
Merge remote-tracking branch 'lenormf/complete-register-names'
2020-02-22 08:39:35 +11:00
Maxime Coste
bc8a9d82c3
Use Control Picture codepoints in prompt for all codepoints < 0x22
...
Fixes #3333
2020-02-22 08:39:21 +11:00
Maxime Coste
3ef8a6160d
Small code style tweak in ranges.hh
2020-02-18 19:28:41 +11:00
Maxime Coste
60782b3dc9
Make diff implementation able to work on different iterator types
2020-02-18 19:26:01 +11:00
Maxime Coste
16e814d99e
Merge remote-tracking branch 'lenormf/fix-makefile'
2020-02-16 10:40:45 +11:00
Maxime Coste
4438895cd5
Merge remote-tracking branch 'lenormf/startup_info-no_kakrc'
2020-02-16 10:40:12 +11:00
Maxime Coste
df4f71aaed
Merge remote-tracking branch 'lenormf/fix-write-switches'
2020-02-15 18:34:18 +11:00
Maxime Coste
940b1b6175
Fix invalid memory access when getting the main entry of empty registers
...
Fixes #3370
2020-02-15 15:42:08 +11:00
Frank LENORMAND
744336ef2b
src: Only remove objects and dependencies for the current target
2020-02-09 19:12:40 +01:00
Frank LENORMAND
e06d61a3e0
src: Allow :write-all
to use -atomic, fix usage
...
It seems that when -atomic was implemented for `:write`, the usage
strings were not updated to reflect that a new flag was available.
The `write-all` command didn't benefit from the implementation of
the new flag despite also writing files - this commit fixes that.
2020-02-09 17:07:47 +01:00
Frank LENORMAND
c0cb5db6a4
src: Let :set-register
complete register names
...
This commit allows the `set-register` command to suggest candidates
named after punctuated registers, similarly to %reg{…} expansions.
2020-02-09 15:31:08 +01:00
Frank LENORMAND
7790e31eb8
src: Don't show startup information when opening a file
...
Follow-up to #3317
2020-02-07 12:27:54 +01:00
Maxime Coste
e9cf0f23f2
Fix regex start desc computation for case insensitive ranges
...
Fixes #3345
2020-02-07 07:37:29 +11:00
Maxime Coste
fbd75d91ec
Merge remote-tracking branch 'maximbaz/notes-formatting'
2020-02-07 07:02:32 +11:00
Maxime Coste
8b633aa79a
Merge remote-tracking branch 'jo-he/master'
2020-02-07 07:01:17 +11:00
Maxime Coste
a105111593
Merge remote-tracking branch 'lenormf/startup_info-no_kakrc'
2020-02-07 07:00:25 +11:00
Frank LENORMAND
1ebab6c269
src: Show the startup information in no-load mode
...
This commit allows the changelog to be shown at startup even when
the editor was run with the -n flag.
2020-02-05 11:39:23 +01:00
Maxime Coste
e348219fee
Merge remote-tracking branch 'omasanori/startup_info_version'
2020-02-05 20:51:17 +11:00
geppettodivacin
39a2ab84fa
Use ReverseView to perform fewer allocations
...
The first attempt at a bug fix for @ symbols in selection buffer names
worked, but it was very inefficient. In particular, it allocated three
different vectors, and we really only needed the correct elements.
Manipulating iterators to give us the right slices of the existing
vector is far more efficient.
By reversing the original content and taking the last two, we're able to
get the number of selections and main selection without too much hassle.
The buffer name is everything from the start of the content to the
selection count. This gets us through with only one vector allocation.
Credit to @mawww for the optimization idea and for fixing my types.
2020-02-02 22:12:18 -06:00
geppettodivacin
5596b4b2b9
Add support for @
symbols in selection buffer
...
The selection descriptions use the format
`<buffer>@<timestamp>@<main_index>`. This fails when file paths have `@`
symbols in them: the parser splits on `@` symbols and finds more values
than it expects.
We here modify the behavior to require *at least* two @ symbols, using
the last two for `<timestamp>` and `<main_index>` and leaving the
remaining text for the <buffer>. This should work for any number of `@`
symbols, since `<timestamp>` and `<main_index>` are numbers and should
never contain `@` symbols.
2020-01-26 16:03:03 -06:00
Masanori Ogino
144380de8c
Fix version comparison in show_startup_info.
...
The description of startup_info_version in the manual says "only messages
relating to a Kakoune version greater than this value will be displayed,"
but showed messages relating to the version equal to that value.
This change aligns the code with the manual and makes a workaround that set
startup_info_version next to the original version (ex. 20200117) unnecessary.
Signed-off-by: Masanori Ogino <masanori.ogino@gmail.com>
2020-01-21 14:51:18 +09:00
Joachim Henke
4914029712
fix several control key combinations in st
2020-01-20 12:51:06 +01:00
Maxim Baz
8f350ad5a9
Bring the italic formatting back
2020-01-20 09:46:11 +01:00
Joachim Henke
2deeb9df52
make the Insert key work in st
2020-01-19 16:22:34 +01:00
Maxim Baz
4dce836c5a
Fix version notes formatting
2020-01-16 13:23:13 +01:00
Maxime Coste
9ca479ed40
Kakoune v2020.10.16
2020-01-16 20:52:20 +11:00
Maxime Coste
b85365bff8
Reset SIGHUP handler on NCursesUI destruction
...
SIGHUP handler could trigger crashes if the EventManager was
already destructed when it was triggered.
Fixes #3288
2020-01-11 17:22:33 +11:00
Maxime Coste
6badd74790
Fix compilation on 32bit platforms
...
Fixes #3284
2020-01-09 20:13:02 +11:00
Maxime Coste
f808539dea
Update inserted range when generating InsertCompletionHide hook param
...
The buffer might have been mutated in the mean time.
Fixes #3270
2020-01-08 20:33:26 +11:00
Maxime Coste
b37638dda4
Split RegexHighlighters matches per requested buffer ranges
...
When a region calls the regex highlighter, it is incorrect to share
the regex cache as it means we can get matches that span multiple
regions.
Fixes #3041
2020-01-05 18:58:32 +11:00
Maxime Coste
80ffc4d34f
Merge remote-tracking branch 'fsub/rxvt'
2020-01-05 10:03:37 +11:00
Maxime Coste
b6f4985c10
Use markup for startup-info message
2020-01-04 12:12:38 +11:00
Maxime Coste
e6b98744c6
Restore support for line wrapping info boxes
...
Fixes #3280
2020-01-04 11:41:16 +11:00
Maxime Coste
8b6ed26e8c
Few style changes on history exposition code
2020-01-02 22:36:26 +11:00
Maxime Coste
43dc494e5c
Merge remote-tracking branch 'eraserhd/history-api'
2020-01-02 21:13:43 +11:00
Jason Felice
b03b51d27a
Add 'history' and 'uncommitted_modifications' expansions
2020-01-01 19:47:29 -05:00
Maxime Coste
a17a0345cf
Fix replacing at begining of buffer
...
Fixes #3275
2019-12-31 12:49:24 +11:00
Maxime Coste
22bfbd06af
Redraw relevant clients after adding/removing highlighters
2019-12-28 11:27:04 +11:00
Maxime Coste
7c1d4f5bd6
Avoid unnecessary std::function
2019-12-28 10:47:16 +11:00
Maxime Coste
456fbd1315
Refactor fifo buffer reader code
2019-12-28 10:32:15 +11:00
Maxime Coste
62b4780e07
Fix command error line/column reporting
2019-12-24 08:34:24 +11:00
Maxime Coste
1946b6b09c
Merge remote-tracking branch 'jkonecny/master-backport-fedora-spec'
2019-12-19 13:45:27 +11:00
Maxime Coste
a3445232a4
Update fs status post buffer write
2019-12-19 13:39:30 +11:00
Jiri Konecny
e6c7a8e44f
Make possible to change compression for make dist
...
This will make possible to get the same archive from make dist as from
GitHub archives. GitHub archives do not support current bzip2.
2019-12-18 17:59:18 +01:00
Maxime Coste
b68490ef11
Cleanup replaced range selection logic
...
Do not access Buffer::m_changes to find the inserted range, return
it directly from Buffer::insert and Buffer::replace. This fixes a
wrong behaviour where replacing at eof would lose the selected end
of line (as the implementation does not actually replace that end
of line)
2019-12-18 11:36:17 +11:00
Maxime Coste
878a7fbb90
Fix window_range expansion
...
It relied on the buffer first char being visible, and could trigger
segfaults when that was not the case.
2019-12-16 14:09:20 +11:00
Maxime Coste
efabe28173
Fix WinResize hook getting triggered during urgent event processing
...
WinResize hooks could be triggered during shell evaluation, leading
to any state potentially getting mutated after a shell evaluation
call.
2019-12-16 14:07:22 +11:00
Tim Allen
b09653ccc5
highlighters.cc: Add a '-min-digits' flag to the number-lines highlighter.
...
Fixes #3260 .
2019-12-15 13:36:25 +11:00
Maxime Coste
dfc67dd582
Code style tweak
2019-12-15 10:47:20 +11:00
fsub
e7e7289813
Support rxvt style s-F3 to s-F10
2019-12-14 23:17:34 +01:00
fsub
3aab032797
Support rxvt style s-F11 and s-F12
...
Rxvt emits `\E[23$` and `\E[24$` for `F21` and `F22` (alias `s-F11` and
`s-F12` provided that `ncurses_shift_function_key` is set to `10`),
respectively.
2019-12-14 20:03:48 +01:00
Maxime Coste
874717885a
Code style tweak in insert_output
2019-12-14 09:20:01 +11:00
Maxime Coste
32157a5809
Merge remote-tracking branch 'lenormf/reevaluate-exclamation-point'
2019-12-14 09:13:43 +11:00
Maxime Coste
53cef671fc
Merge remote-tracking branch 'Screwtapello/tmux-keys'
2019-12-12 12:02:51 +11:00
Tim Allen
170762b4d9
src/ncurses_ui.cc: Add support for VT220-style Home and End keys.
...
Because we now support a bunch of different conventions for these keys, let's
add some citations for the benefit of future maintainers.
Fixes #3252 .
2019-12-11 22:53:15 +11:00
Tobias Kortkamp
fc2b5c5f7b
Fix build on FreeBSD again
...
json_ui.cc:29:9: error: use of undeclared identifier 'sprintf'
sprintf(buffer, R"("#%02x%02x%02x")", color.r, color.g, color.b);
^
1 error generated.
Regressed by 7cdbe1d3d2
2019-12-10 18:13:08 +01:00
Maxime Coste
9ace7b584d
Kakoune v2019.12.10
2019-12-10 21:36:03 +11:00
Maxime Coste
15df0fc781
Add -scratch and -file switches to the rename-buffer command
2019-12-07 15:40:57 +11:00
Maxime Coste
42094209fd
Update New flag and last save timestamp on buffer rename
...
Fxies #3244
2019-12-07 15:40:55 +11:00
Maxime Coste
023a65eeac
Optimize regex in command
2019-12-05 21:11:12 +11:00
Maxime Coste
eb5af59d55
Restore regex optimization pass by introducing basic block analysis
...
Run the peephole optimizer on each basic block, avoiding the
previous issue that some instructions could move across their
boundaries.
2019-12-05 21:10:14 +11:00
Maxime Coste
d539e8fb89
Do not decode utf-8 when looking for regex next start
...
There is no need to decode as we know any non-ascii characters will
be treated as Other in the StartDesc.
2019-12-04 22:33:11 +11:00
Maxime Coste
ee2985739b
Merge remote-tracking branch 'lenormf/window-range'
2019-12-04 21:16:11 +11:00
Maxime Coste
5c5d881c11
Merge remote-tracking branch 'lenormf/reload-buffer-hash'
2019-12-04 21:14:15 +11:00
Frank LENORMAND
e1bd076f5e
src: Reload buffers when their contents' hash changes
...
Instead of triggering a reload event when the timestamp of a buffer's
underlying file changes, do so when its contents are actually modified.
2019-12-03 17:05:24 +01:00
Maxime Coste
0b66aa8dda
Document that fg face is optional
2019-12-03 21:17:33 +11:00
Maxime Coste
36dce6a2d0
Merge remote-tracking branch 'lenormf/split-json'
2019-12-03 21:13:35 +11:00
Maxime Coste
5c1433ee65
Merge remote-tracking branch 'Laaas/patch-1'
2019-12-03 21:11:14 +11:00
Maxime Coste
b5baac4336
Merge remote-tracking branch 'lenormf/fix-doc-face-base'
2019-12-03 20:59:40 +11:00
Maxime Coste
a6a5d866a5
Merge remote-tracking branch 'somasis/master'
2019-12-03 20:59:33 +11:00
Frank LENORMAND
d32a660863
src: Document the base face syntax in :set-face
2019-12-02 11:37:31 +01:00
Frank LENORMAND
63092d12c0
src: Fix the build on Mac
...
When compiled on Mac with `clang`, the following error occurs at
compile-time:
```
./diff.hh:56:28: error: no member named 'min' in namespace 'std'
const int max_D = std::min((M + N + 1) / 2 + 1, cost_limit);
~~~~~^
```
2019-12-01 21:55:55 +01:00
Maxime Coste
2623366514
Pass inserted text ranges in InsertCompletionHide hook parameter
...
Fixes #2898
2019-12-01 21:05:02 +11:00
Kylie McClain
dc1cf24846
buffer.hh: Fix building on musl+libc++
...
Fixes #3233 .
2019-11-29 22:58:36 -05:00
Maxime Coste
4fdbf21ff8
Refactor diff to make allocating a diff vector optional
...
The diff interface now goes through a for_each_diff function that
uses a callback for each found diff.
2019-11-30 11:29:36 +11:00
Mikhail Pogretskiy
89b4996fd7
Update scroll behavior
2019-11-28 22:35:52 +07:00
Maxime Coste
b765fb4971
Merge remote-tracking branch 'lenormf/fix-mmap-size-check'
2019-11-28 20:35:52 +11:00
Maxime Coste
085e7dd09e
Merge remote-tracking branch 'lenormf/patch-2'
2019-11-28 20:32:16 +11:00
Maxime Coste
2904d13420
Add a {\} marker to disable markup processing
2019-11-28 20:23:52 +11:00
Frank LENORMAND
7a384edeb0
src: Check the filesize before calling mmap()
2019-11-26 13:26:31 +01:00
Maxime Coste
fc9e0e8c6a
Fix small info text not being displayed
2019-11-26 22:08:05 +11:00
Maxime Coste
a933cae7b9
Merge remote-tracking branch 'lenormf/complete-expansion-reg'
2019-11-26 21:35:05 +11:00
Maxime Coste
9716c7c82d
Merge remote-tracking branch 'lenormf/complete-expansion-file'
2019-11-26 21:34:22 +11:00
Frank LENORMAND
7512f5eae6
src: Use begin()
to get iterators
...
When compiling the code with `-Wp,-D_GLIBCXX_ASSERTIONS`, the process
gets aborted, likely because iterators to standard containers are
not obtained in a safe way.
Fixes #3226 .
2019-11-25 11:34:39 +01:00
Maxime Coste
6f087e899b
Complete rename-buffer with filenames
...
Fixes #3215
2019-11-24 18:11:29 +11:00
Maxime Coste
6fd486c65e
Replace tab characters with spaces in info/echo
...
This is tricky to fix better than that as tabs make text length
dependent on where it will get displayed and what preceedes it.
Also fix an issue with empty info title
Fixes #2237
2019-11-24 18:11:29 +11:00
Maxime Coste
34f48cc851
Rework ncurses info display, crop content when overlflowing
...
Optmize the code to avoid allocating like crazy, unify various
info style rendering, crop content and display markers that there
is more text remaining.
Fixes #2257
2019-11-24 18:11:29 +11:00
Maxime Coste
19e1be8e0d
Make wrap_lines a lazy range view
...
Avoid the need to allocate a vector by using the ranges
framework.
2019-11-23 21:50:58 +11:00
Frank LENORMAND
ae85753c41
src: Complete filenames in %file{}
expansions
2019-11-23 08:59:44 +01:00
Frank LENORMAND
2cdf86d674
src: Complete register names in %reg{}
expansions
...
Builtin registers have name aliases that can be completed upon when
using a `%reg{}` expansion from the prompt.
2019-11-23 08:47:14 +01:00
Maxime Coste
cb1b03c0db
Add support for markup in info boxes
...
Fixes #2552
2019-11-22 21:50:51 +11:00
Maxime Coste
22d9ffa63a
Fix crash when deleting buffers in a BufClose hook
2019-11-22 20:29:55 +11:00
Maxime Coste
82e5346904
Add a -atomic switch to write and change clang.kak to take advantage
2019-11-21 23:38:32 +11:00
Frank LENORMAND
15f6485327
src: Give a reason why :rename-buffer
failed
2019-11-18 16:46:53 +00:00
Maxime Coste
c031a276d5
Fix recently introduced ncurses redraw artifact
2019-11-18 21:17:22 +11:00
Maxime Coste
ba621dedd6
Ignore SIGTTOU
...
We can get this signal while suspending if a parent process (say
git-commit) has already put us in the background. We still need
to reset the termios state to exit raw input mode and make the shell
usable.
Fixes #3069
2019-11-18 21:00:59 +11:00
Maxime Coste
d3c3e59bbf
Fix search menu trimmed entry display
2019-11-17 22:53:27 +11:00
Maxime Coste
1de038a743
Move the forked server into a new session and process group
...
Fixes #3212
2019-11-17 22:44:49 +11:00
Frank LENORMAND
19f1754a2a
src json: Limit the recursion depth to 100
2019-11-17 09:27:46 +01:00
Frank LENORMAND
7cdbe1d3d2
src: Move JSON parsing code to its own file
...
The `json_ui.cc` file contained both data-parsing and UI-related
code. This commit moves the JSON parsing code to its own `json.cc`
file, to separate concerns, make compilation faster when changes are
made to either UI or parsing code, and make the parsing code more
accessible to fuzzers.
The signature of the following function:
```
auto parse_json(StringView json);
```
was changed to:
```
JsonResult parse_json(StringView json);
```
to avoid `auto` deduction issues at compile-time.
2019-11-17 09:27:46 +01:00
Maxime Coste
5378dabdec
Fix String::resize not zero-terminating
2019-11-17 09:50:18 +11:00
Maxime Coste
e33ba455c8
Re-merge clear_to_eol in draw
2019-11-13 22:17:08 +11:00
Jason Felice
0f58f01428
Fix display column computations
...
Closes #3201
2019-11-12 20:43:14 -05:00
Maxime Coste
a7d3976a10
Fix typo
2019-11-13 08:58:15 +11:00
Maxime Coste
e964b68ab8
Add support for selecting and exporting selections in display columns
...
Fixes #2724
2019-11-12 21:56:45 +11:00
Maxime Coste
7a8f57f97b
Add support for a -codepoint switch to the select command
2019-11-12 21:21:24 +11:00
Jason Felice
5fae16faef
Implement %val{selections_char_desc}
...
Fixes #3194
2019-11-12 20:54:32 +11:00
Maxime Coste
6eb820dc54
Fix use after free in enter_user_mode, use user.<name>
for modename
...
Fixes #3192
2019-11-12 08:54:49 +11:00
Maxime Coste
5060a4733a
Add mode information to next-key mode name
...
Currently expose an additional name, the format is up for
discussion.
Fixes #1855
Fixes #2569
Fixes #2672
2019-11-11 21:47:47 +11:00
Maxime Coste
f119fb9524
Aggregatify ConcatView
2019-11-10 12:04:44 +11:00
Jason Felice
87e5a2f512
Avoid copy constructing BufferCoord when comparing
2019-11-09 12:53:45 -05:00
Jason Felice
9692e491ac
Fix bad comparison when parsing OSI sequences
2019-11-09 12:53:45 -05:00
Jason Felice
c589f475a5
Add override
2019-11-09 12:53:45 -05:00
Jason Felice
d26bb0ce2b
Add static or const where useful
2019-11-09 12:53:45 -05:00
Jason Felice
49ca512733
Remove unused trim_whitespaces()
2019-11-09 12:53:45 -05:00
Maxime Coste
d85259f801
Merge remote-tracking branch 'eraserhd/selection-list-cleanup'
2019-11-09 08:50:09 +11:00
Maxime Coste
8e63aa1548
Check that stdout is a tty in ncurses ui
2019-11-09 08:19:45 +11:00
Jason Felice
c9fce9f83d
Merge selection list parsing into selection_list_from_strings
2019-11-07 14:51:04 -05:00
Maxime Coste
f794a35de3
Merge remote-tracking branch 'Delapouite/parameterdesc'
2019-11-07 20:15:14 +11:00
Maxime Coste
3e7301ede7
Support \x and \u escapes in regex character classes
...
Change \u to use 6 digits to cover the full unicode range.
Fixes #3172
2019-11-06 20:48:48 +11:00
Frank LENORMAND
3816f1fa43
src: Make sure clients connect from a TTY
...
Fixes #3159
2019-11-05 20:24:08 +01:00
Maxime Coste
294a5b72e6
Fix some ncurses rendering issues
2019-11-05 17:36:21 +11:00
Maxime Coste
6f3124d678
Split clearing to end of line out of NCursesUI::Window::draw
...
Explicitely clear instead of relying on a brittle heuristic.
2019-11-05 08:04:58 +11:00
Maxime Coste
0f292d343b
Use a specific WrapMarker face for wrap highlighter wrapped line marker
2019-11-04 21:49:54 +11:00
Delapouite
6f6b219787
Use single_param more and add double_params
2019-11-01 18:25:55 +01:00
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
Frank LENORMAND
c744b59f7d
src: Add a window_range
default expansion
...
This commit adds a `window_range` default expansion that holds the
coordinates and size of the buffer-space on the window.
Fixes #675
2019-10-20 21:35:50 +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