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
a17a0345cf
Fix replacing at begining of buffer
...
Fixes #3275
2019-12-31 12:49:24 +11: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
7b3ab23780
Add a regression test for #3219 , which does not seem to fail
2019-11-24 18:11:29 +11:00
Maxime Coste
22d9ffa63a
Fix crash when deleting buffers in a BufClose hook
2019-11-22 20:29:55 +11:00
Jason Felice
e712138ebd
Fix test suite freeze
...
The issue is that the `test/regression/2056-assert-on-small-window`
sent JSON UI input without waiting for for the JSON UI to be
initialized.
Closes #3196
2019-11-12 09:39:37 -05:00
Jason Felice
e888f4341c
test: Allow expect-style UI tests, testing any var
2019-10-13 14:57:24 -04: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
Maxime Coste
1c6aa9baed
Fix bug in WrapHighlighter::do_compute_display_setup
...
Additional lines were not pulled correctly when a line was removed
due to its wrapping hiding the cursor.
Fixes #2999
2019-08-05 20:16:59 +10:00
Maxime Coste
e42c81c8eb
Ensure current context switches away from buffer on delete-buffer
...
Fixes #3025
2019-07-22 20:26:39 +10:00
Maxime Coste
be3d0f8b33
Filter non-extra_word_chars completion candidates using Codepoints
...
Fixes #3010
2019-07-09 19:36:57 +10:00
Maxime Coste
1ebea85e6f
Do not merge selections on backspace in insert mode
...
Fixes #2861
2019-05-29 23:12:04 +10:00
Maxime Coste
1c8f1cbc2f
Fix wrapping of words with 'wrap col - indent < word len < wrap col'
...
Add a test case for those, and refactor bits of the wrap highlighter.
This explains part of the needed complexity in #2820 .
2019-04-24 11:40:57 +01:00
Alex Leferry 2
c0dccdd90d
Add categories in rc/
...
Closes #2783
2019-03-21 01:06:16 +01:00
Maxime Coste
f9d421130f
Fix use of invalidated iterators in highlight_range
...
Fixes #2755
2019-03-05 20:31:40 +11:00
Maxime Coste
a61b6d7649
Add a test case for WinDisplay segfault
...
Fixes #2737
2019-02-17 11:21:26 +11:00
Maxime Coste
5c0175d90a
Remove peephole regex optimization pass
...
The current implementation is wrong as it crosses basic blocks
boundaries. Doing basic block decomposition of regex is probably
a tad too complex for this single optimization.
Fixes #2711
2019-02-04 22:10:19 +11:00
Maxime Coste
370d10ccc7
Always select inserted text after piping
...
Relying on general selection update code is error prone due to
diffing.
Fixes #2394
2019-01-23 20:14:08 +11:00
Maxime Coste
0e1e0fc57b
Improve deindent behaviour with mixed indent
2018-12-13 17:35:16 +11:00
Maxime Coste
b9ca3ee6dc
Fix column highlighter adding display atoms past the window width
2018-11-14 17:47:11 +11:00
Maxime Coste
a383ce3045
Fix LineRangeSet::udpate not updating some traling ranges correctly
...
Fixes #2499
2018-10-21 11:49:30 +11:00
Maxime Coste
ed84a2d60c
Buffer begin and end are not end-of-words
...
Buffer begin never has a word character before, and end is always
preceeded by an end-of-line.
Fixes #2420
2018-10-08 12:40:52 +11:00
Justin Frank
ab6bc41358
Added shell command completion support to define-command and prompt
...
This commit also introduces a regression in that I decided that the best way to
avoid overly long and confusing names was to rename the current shell-*
switches to script-*, and have the shell command completion be
shell-completion.
renamed script-{completion,candidates} to shell-script-*
Updated docs with new switch names
Added -shell-completion switch to x11-repl and kitty-repl
2018-10-03 09:46:31 -07:00
Olivier Perret
93f913705a
Misc fixes
2018-09-24 09:54:21 +02:00
Maxime Coste
cb8b882878
Fix broken test after change in cursor faces
2018-09-24 08:15:12 +10:00
Maxime Coste
1631a7d8d9
Replace the Exclusive
face attribute with Final
...
Final is more granular, it consists of FinalFg (f), FinalBg (g)
and FinalAttr (a) which control if a face's fg, bg, or attributes
fully overwrite the previous face (instead of merging) and if
following faces apply on top of this face or not.
Fixes #2388 if the Whitespace face has the FinalFg flag.
2018-09-23 23:27:14 +10:00
Maxime Coste
8536adc5ac
Merge remote-tracking branch 'eraserhd/2367-surround-with-tight-nesting'
2018-09-12 20:57:59 +10:00
Maxime Coste
d3be78cca2
Only commit undo groups when buffer was modified
...
This fixes an interaction with kak-lsp that would trigger undo group
commit when setting a buffer option value.
2018-09-12 20:02:57 +10:00
Jason Felice
83244af106
Don't skip opening brace twice when finding closing
...
Fixes #2367
Fixes #2129
2018-09-09 10:15:41 -04:00
Maxime Coste
d23ac09fc1
Add support for <a-;> in prompt mode
...
Fixes #2096
Closes #2060
2018-07-15 11:17:16 +10:00
Maxime Coste
79ec8d0010
Rename highlighters that used an underscore to use a dash
...
For example `show_matching` is now `show-matching`.
2018-07-08 19:14:15 +10:00
Maxime Coste
63d4c8c311
Change a
on end of line behaviour to be consistent
...
`a` will just jump on next line, `a` on last end of line opens a new
line beneath it.
Fixes #1164
2018-07-05 08:00:14 +10:00
Maxime Coste
2e0e206951
Make recurse regex opt-in with a -recurse switch instead of opt-out
2018-07-05 07:54:28 +10:00
Maxime Coste
f61bcef469
Fix tests and required scripts to get back to green make test
2018-07-05 07:54:28 +10:00
Maxime Coste
124a5d4905
Tolerate restoring invalid coordinates from register
...
Clamp those selection after updating them to the current timestamp
Fixes #2078
2018-07-05 07:54:28 +10:00
Maxime Coste
9387abed81
tests: Update selections files to match the new selection list syntax
2018-07-05 07:54:28 +10:00
Maxime Coste
667777521b
Refactor the way main selection is determined after rotating contents
...
Fixes #2133
2018-06-21 08:07:17 +10:00
Maxime Coste
6dca67c674
Fix two <s-tab> requiered to access last completion in prompt
...
A single <s-tab> should be enough.
2018-06-19 07:40:52 +10:00
Maxime Coste
9b89652b0b
Fix potential assert on itersel selection restoration
...
We cannot guarantee after an itersel that selections are going to
still be in ascending order, but we were calling a SelectionList
constructor that was assuming this was the case.
2018-05-24 08:08:51 +10:00
Maxime Coste
878d2a4bdb
Add regression test for crash on BufSetOption hook
2018-05-21 20:36:25 +10:00
Maxime Coste
c9a8658671
Fix assert with window small enough so that no part of buffer is displayed
...
Fixes #2056
2018-05-19 14:15:16 +10:00
Maxime Coste
851494a374
test/run: Rename "display" expected ui output file as "ui-out"
2018-05-19 14:15:16 +10:00
Maxime Coste
148d6c205b
Fix wrong behaviour in select surrounding
...
Fixes #2030
2018-05-07 22:17:57 +10:00
Maxime Coste
e4f90e5ed2
Fix tests after changes to json_ui output
2018-04-29 23:06:24 +10:00
Delapouite
746b9acb96
Change client default name: "unnamed0" → "client0"
2018-04-23 11:42:11 +02:00
Maxime Coste
3d3a37a80c
Fix 'O' not putting the cursor on the correct line
2018-03-27 07:28:25 +11:00
Maxime Coste
59e9108812
indent selector: When line is empty, find indent from surrounding lines
...
Look for the first non empty line preceeding the current line, or
if not found, the first non empty line following it.
Fixes #1904
2018-03-25 10:25:56 +11:00
Maxime Coste
ac91a79b12
Fix implementation of real_path to handle non-existing directories in /
...
Fixes #1937
2018-03-18 23:23:00 +11:00
Maxime Coste
7ba4ef897b
Fix crash on expanding command line strings
2018-03-18 04:58:15 +11:00