Commit Graph

343 Commits

Author SHA1 Message Date
Ivan Tham
4ccb5fd315 Highlight doc tests in rust
Feels a big laggy when system overloaded
2020-05-31 11:47:47 +08:00
Maxime Coste
ec4980df34 Merge commit 'krobelus/05-highlight-replace-ranges-crash^' 2020-05-30 09:18:35 +10:00
Maxime Coste
08e0b663f7 Fix unintended interpretation of ranges length syntax
Ranges specified with a +<length> were inconsistent, with +0 meaning
an empty range, while +1 meant a two character long range (first character
+ the following one). Change that to mean a single character.

Fixes #3479
2020-05-29 12:25:57 +10:00
Johannes Altmanninger
61f474fd9d Fix typo in readme 2020-05-28 21:41:21 +02:00
Maxime Coste
109abbeed4 Fix invalid regions with begin > end being generated
Fixes #3495
2020-05-28 20:58:46 +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
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
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
65620fb830 Display all failing ui_out in tests instead of just the first one 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
a33b938652 Fix issue with select object and empty matches 2020-04-21 13:21:35 +10:00
Maxime Coste
952aa0ed0a Drop trailing EOL in test commands 2020-04-13 13:36:29 +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
0282cc022e Use %file in the test run script instead of %sh 2020-03-14 13:52: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
21dc5284b2 Fix use of non-posix \x printf escape 2020-03-13 09:33:19 +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
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
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
7470b22c97 Merge remote-tracking branch 'eraserhd/lisp-nested-brackets' 2020-01-05 09:55:37 +11:00
Jason Felice
0ed3bd662c {clojure,lisp}.kak: handle doubled brackets 2020-01-03 15:14:56 -05: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
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
Tim Allen
c7356b363e test: number-lines highlighter now reserves 2 digits by default.
Fixes regression caused by #3261.
2019-12-17 00:57:28 +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
8528dcd621 Fix test/run ui_out diff display 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
Maxime Coste
4d7ea276c4 Use fullwidth latin character in test to try to fix travis 2019-11-18 23:00:19 +11:00
Maxime Coste
25429a905b Try to fix select-display-column test 2019-11-17 10:52:25 +11:00
Maxime Coste
f9d3b0f671 Add select display columns test 2019-11-13 20:13:49 +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
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
Jan-Jaap Korpershoek
fcc8ed5df3 [html] Fix indentation when entering a newline while in the middle of a tag
Example:

```
        <tag>|</tag>
```
Then press enter

Old behaviour:
```
        <tag>
            </tag>
```
New behaviour:
```
        <tag>
        </tag>
```

I also added a test for it
2019-11-03 12:25:02 +01:00
Jason Felice
e888f4341c test: Allow expect-style UI tests, testing any var 2019-10-13 14:57:24 -04:00
Jason Felice
2b1ca43328 test: Clear socket correctly when XDG_RUNTIME_DIR is set 2019-10-13 14:56:55 -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
e840140b38 Add indent tests for brace after else indent 2019-07-25 17:27:08 +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
9363f98f5b Fix indent/sh/deindent-after-esac test case 2019-07-01 22:04:04 +10:00
Maxime Coste
5c219cc743 Merge remote-tracking branch 'sjjf/sh_indent_v2' 2019-07-01 22:00:31 +10:00
Simon Fowler
c5dd013235 Add tests.
Probably overkill, but at least this is comprehensive . . .
2019-06-30 12:57:59 +10:00