| Age | Commit message (Collapse) | Author |
|
The previous code was advancing from the general insertion point
for all selection, instead of iterating only once from insertion
point until the end of inserted text.
|
|
Giving an explicit register uses its content for the default value
to use if the user does not enter anything. This enables:
`set-register a %{commands}; execute-keys '"a:<ret>'`
`set-register a %{shell script}; execute-keys '"a|<ret>'`
...
This provides a nice way to avoid the need to escape keys to use
those normal mode commands.
Fixes #3825
|
|
It turns out `v = std::move(v)` with v a std::vector is not a no-op,
it clears the vector.
|
|
Remove the need to allocate anything when removing selections.
|
|
posB is always the sum of previous add len and previous keep len,
so very easy to keep track of.
|
|
|
|
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
|
|
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.
|
|
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.
|
|
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)
|
|
|
|
|
|
The diff interface now goes through a for_each_diff function that
uses a callback for each found diff.
|
|
|
|
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.
|
|
|
|
Fixes #2724
|
|
|
|
Currently expose an additional name, the format is up for
discussion.
Fixes #1855
Fixes #2569
Fixes #2672
|
|
|
|
|
|
|
|
fix #3089
|
|
|
|
Fixes #3025
|
|
|
|
This commit makes the `*` and <a-*> primitives compose a search pattern
comprised of all the current selections, as opposed to only the main one.
All selections are OR'd into the default search register, which makes it
convenient to search for several identifiers already selected.
To retain the old behaviour, the following mappings can be used:
```
map global normal * ': exec -draft -save-regs "" %{<space>*}<ret>'
map global normal <a-*> ': exec -draft -save-regs "" %{<space><a-*>}<ret>'
```
Fixes #2994
|
|
|
|
|
|
|
|
Only fail if all selections are discarded.
Fixes #2841
|
|
|
|
|
|
|
|
|
|
|
|
This should greatly improve performances as we only need to diff
lines instead of individual characters.
Closes #2678
Fixes #2037
|
|
Relying on general selection update code is error prone due to
diffing.
Fixes #2394
|
|
|
|
|
|
|
|
Fixes #2599
|
|
|
|
Closes #2425
|
|
|
|
Fixes #2387
|
|
|
|
|
|
|
|
Clamp those selection after updating them to the current timestamp
Fixes #2078
|