Commit Graph

9842 Commits

Author SHA1 Message Date
Maxime Coste
8299d1da1f Fix pasting all from empty register
Raise an error if the register is empty for paste-all

Fixes #4414
2021-11-01 09:05:57 +11:00
Frank LENORMAND
0442453a64
doc regex: Avoid confusion in relationship with ECMAScript
Co-authored-by: Screwtapello <thristian@gmail.com>
2021-10-29 19:21:50 +02:00
Johannes Altmanninger
068623e1c8 doc options: state that all |-separated tuples need escaping
For the "completions" option type, the documentation states that |
and \ need to be escaped as \| and \\.
The same parser is for other option types that are lists-of-tuples:
range-specs and line-specs, so they need escaping too. Document that.

Only their last element can contain arbitrary data, so range-specs
and line-specs could work without escaping if we tweaked the parser.
2021-10-29 18:25:53 +02:00
Maxime Coste
d2e2caaae6 Fix incorrect reading logic and EAGAIN handling
This is one of the issues raised by #4410
2021-10-29 22:34:19 +11:00
Frank LENORMAND
764a8b0602
doc regex: Avoid confusion in relationship with ECMAScript
The prologue led some users to believe the implementation was compliant with ECMAScript let alone some differences (who *are* documented at the end of the page).
2021-10-29 12:09:19 +02:00
Maxime Coste
be4659097c Complete alias command with existing alias names 2021-10-29 08:20:08 +11:00
Maxime Coste
874f3e0764 Fix terminal underline color not being properly reset 2021-10-29 07:51:29 +11:00
Sidharth Kshatriya
be8dd0eb3d Erlang syntax highlighting: Improved support for numeric literals, refs, ports and pids 2021-10-28 12:43:00 +05:30
Maxime Coste
da10ce817e Kakoune 2021.10.28 2021-10-28 09:13:34 +11:00
Maxime Coste
946673850e Merge remote-tracking branch 'sidkshatriya/erlang-syntax-highlighting' 2021-10-28 09:09:46 +11:00
Maxime Coste
95e43a2af3 Merge remote-tracking branch 'lxnn/master' 2021-10-28 09:08:53 +11:00
Robert Clausecker
120e4b5a5d src/main.cc: Fix inline assembly syntax error on ARM
ARM uses @ as a comment character, so %progbits must be
used in place of @progbits here.  This change fixes the
build on armv7 FreeBSD 13.0.

Fixes		mawww/kakoune/issues#4385
See also	https://bugs.freebsd.org/259434
2021-10-25 15:17:49 +02:00
LXNN
ebcb47e096 Add new '_', 'case', and 'match' keywords to Python highlighter 2021-10-24 12:56:18 +01:00
LXNN
b7b8dbe150 LXNN Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2021-10-24 12:52:58 +01:00
Maxime Coste
6e635ea301 Merge remote-tracking branch 'lenormf/fix-2164' 2021-10-24 18:42:37 +11:00
Frank LENORMAND
16dfe977b2 src: Make gf open all selected paths
The buffer whose path is under the main selection will be focused
after all others have been opened.

Closes #2164
2021-10-24 09:01:24 +02:00
Sidharth Kshatriya
a547e731f2 Add detection, intialization and basic syntax highlighting for Erlang 2021-10-24 11:47:55 +05:30
Maxime Coste
502e3f6857 Fallback to basic path on platforms where _CS_PATH is not defined
This happens on termux for example.
2021-10-24 09:37:59 +11:00
Maxime Coste
7c6f111d5f Ensure rename-buffer uses a filename for file buffers
Fixes #4391
2021-10-24 09:30:31 +11:00
Maxime Coste
5c1e10decb Merge remote-tracking branch 'lenormf/fix-4340' 2021-10-24 09:04:14 +11:00
Frank LENORMAND
c57a86ce62 src: Fix undefined behaviour
Cppcheck produces the following warnings:

```
shared_string.hh:27:49: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour
shared_string.hh:27:49: error: Signed integer overflow for expression '1<<31'.
```

Fixes #4340
2021-10-23 10:36:37 +02:00
Frank LENORMAND
367879ddcf src: Use pre-increment iterator syntax
Cppcheck produces the following warning:

```
string_utils.cc:24:9: performance: Prefer prefix ++/-- operators for non-primitive types.
```

Fixes #4340
2021-10-23 10:34:27 +02:00
Frank LENORMAND
aff303190d src: Fix the API of KeymapManager::add_user_mode()
Cppcheck produces the following warning:

```
keymap_manager.hh:54:37: performance: Function parameter 'user_mode_name' should be passed by const reference.
```

Fixes #4340
2021-10-23 10:34:27 +02:00
Maxime Coste
60165bacf9 Use DECRQM/DECRPM to detect support for synchronized output
Enable it if supported by default, let the user override it with
the existing terminal_synchronized ui option.

This should finalize work discussed on #4317
2021-10-23 09:42:31 +11:00
Maxime Coste
70bec01f0b Merge remote-tracking branch 'alexherbo2/fix-asciidoc-blocks' 2021-10-23 08:35:19 +11:00
Frank LENORMAND
0af234a329 src: Implement the enumerate() range filter 2021-10-21 10:58:46 +02:00
Taupiqueur
dd917e47f4 Fix region highlighter example 2021-10-19 18:21:48 +02:00
Taupiqueur
907cc576ea Fix AsciiDoc blocks
https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/
2021-10-17 00:19:53 +02:00
Maxime Coste
689553c2e9 Split InsertMode into InsertMode and PasteMode
They are quite different use cases, and this allow moving InsertMode
to input_handler.hh which is what uses it.

This also cleans up the code as we can get rid of get_insert_pos and
rely more on SelectionList::for_each.
2021-10-10 11:02:09 +11:00
Maxime Coste
b609adc84c Merge http://github.com/Jonta/kakoune 2021-10-09 15:44:43 +11:00
Maxime Coste
ddcfa0f0e5 Merge remote-tracking branch 'lenormf/fix-1840' 2021-10-09 15:43:43 +11:00
Jonta
e93ebbca78
Grammar 2021-10-07 04:59:03 +02:00
Jonta
123a264894
Merge pull request #1 from Jonta/Jonta-grammar-an-highlighter-1
Grammar
2021-10-07 04:57:53 +02:00
Jonta
4a34ae9c2d
Grammar 2021-10-07 04:57:29 +02:00
Jonta
caea620229
Grammar 2021-10-07 04:54:55 +02:00
Frank LENORMAND
0d87d70bd1 src: Remove spurious break 2021-10-06 08:44:47 +02:00
Frank LENORMAND
a5dd8a7935 src: Allow ga to skip removed buffers
This commit prevents `ga` from returning a “no last buffer” error
when the previously displayed buffer was removed.

Since the jumps list keeps track of the order in which buffers were
displayed already, handling arbitrary `delete-buffer`s as well,
cycle through it to implement `ga` instead of storing a pointer.

Note that this commit doesn't take into account buffer flags that
might exclude some buffers from being cycled over by commands.

Fixes #1840
2021-10-06 08:44:47 +02:00
Maxime Coste
21494e5d78 Merge remote-tracking branch 'lenormf/fix-3976' 2021-10-06 09:00:21 +11:00
Evan Lloyd New-Schmidt
6b6577d8b9 Disable comment_line for ocaml/coq
OCaml does not have line comments, and as far as I can tell neither
does Coq. Setting it to '' (like markdown and html do) throws an error
that can be handled or displayed instead of inserting the default '#'.
2021-10-04 13:19:00 -04:00
Evan Lloyd New-Schmidt
d6388f3895 Evan New-Schmidt Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2021-10-04 13:19:00 -04:00
Maxime Coste
09f4ef0917 Merge remote-tracking branch 'lenormf/fix-4353' 2021-09-30 20:43:02 +10:00
Maxime Coste
5f8753caec rework selection insert/replace using a for_each method
expose that method so that various commands can take advantage of
it for performance or simplicity purposes.
2021-09-30 20:12:58 +10:00
Maxime Coste
05fb07fbc6 Add tests for <a-p>/<a-P>/<a-R> 2021-09-30 20:12:48 +10:00
Maxime Coste
85a1f78ca9 Merge remote-tracking branch 'Ordoviz/patch-2' 2021-09-29 20:31:30 +10:00
Maxime Coste
133cb9053a Merge remote-tracking branch 'hugomg/better-lua-indentation' 2021-09-29 20:25:15 +10:00
Lennard Hofmann
55b2b8c88d rc markdown: Fix fenced code blocks
The closing ``` in the following example was not detected because the
indented code block highlighter was higher up in the hierarchy than the
fenced code block highlighter:

```
    indented
```

The codeblock highlighter used to be inline so that it has an effect
inside listblocks. This commits adds a listblock/codeblock highlighter
as a replacement.

Fixes #4351
2021-09-27 17:34:31 +02:00
Hugo Musso Gualandi
25a0fe8f58 lua.kak: Add test cases for unindent 2021-09-26 11:54:43 -03:00
Hugo Musso Gualandi
c26fb65ed1 lua.kak: Add some test cases, and also fix a bug 2021-09-26 11:19:58 -03:00
Maxime Coste
e3bcd6a74b Merge remote-tracking branch 'lenormf/modeline_readonly_status' 2021-09-26 11:09:34 +10:00
Maxime Coste
fb734cb61b Merge remote-tracking branch 'lenormf/fix-4273' 2021-09-26 11:09:34 +10:00