Maxime Coste
63371da8aa
Avoid to_remove vector in select helper function
...
Remove the need to allocate anything when removing selections.
2020-05-29 12:00:02 +10:00
Maxime Coste
94f33bb638
Add a range based remove_if overload
2020-05-29 11:59:03 +10:00
Johannes Altmanninger
13a6aa2fbd
refactor: remove extra semicolons
2020-05-28 20:04:32 +02:00
Maxime Coste
109abbeed4
Fix invalid regions with begin > end being generated
...
Fixes #3495
2020-05-28 20:58:46 +10:00
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