| Age | Commit message (Collapse) | Author |
|
<memory> is a costly header we can avoid by just implementing
UniquePtr ourselves, which is a pretty straightforward in modern
C++, this saves around 10% of the compilation time here.
|
|
Extract the logic for "waiting for shell to finish" and reuse it for
potentially blocking calls to open() that use the O_WRONLY flags.
|
|
|
|
This makes it possible to remove the pending clears whenever an
info/status line is explicitely added, removing a class of race
conditions introduced by the previous implementation.
|
|
A common pattern is for info/echo messages to be generated by idle
hooks but the clearing of previous info/echo was done immediately on
normal mode events. This led to flickering of the info box especially
when a hook was repeatidly generating the same info (like moving
a cursor in the same word where the hook reacts to the word under
the cursor).
|
|
This was mostly redundant with Client::force_redraw.
|
|
From the issue:
> It often happens to me that I carefully craft a selection with multiple
> cursors, ready to make changes elegantly, only to completely mess it
> up by pressing a wrong key (by merging the cursors for example). Being
> able to undo the last selection change (even if only until the previous
> buffer change) would make this much less painful.
Fix this by recording selection changes and allowing simple linear
undo/redo of selection changes.
The preliminary key bindings are <c-h> and <c-k>.
Here are some other vacant normal mode keys I considered
X Y
<backspace> <minus>
# ^ =
<plus> '
unfortunately none of them is super convenient to type. Maybe we
can kick out some other normal mode command?
---
This feature has some overlap with the jump list (<c-o>/<c-i>) and
with undo (u) but each of the three features have their moment.
Currently there's no special integration with either peer feature;
the three histories are completely independent. In future we might
want to synchronize them so we can implement Sublime Text's "Soft
undo" feature.
Note that it is possible to restore selections that predate a buffer
modification. Depending on the buffer modification, the selections
might look different of course. (When trying to apply an old buffer's
selection to the new buffer, Kakoune computes a diff of the buffers
and updates the selection accordingly. This works quite well for
many practical examples.)
This makes us record the full history of all selections for each
client. This seems wasteful, we could set a limit. I don't expect
excessive memory usage in practice (we also keep the full history of
buffer changes) but I could be wrong.
Closes #898
|
|
Fixes #2552
|
|
|
|
|
|
Fixes #3025
|
|
|
|
Avoids warning about non virtual destructor calls on them,
as they have a vtable due to OptionManagerWatcher.
|
|
Add a UserInterface::is_ok method and return false on
SIGHUP/stdin closing/socket dropping
This should be cleaner and more robust than the previous SIGHUP
handling code.
Fixes #1594
|
|
Fixes prompt getting erased by the wait for shell message, and
having to manually trigger a redraw to see it again.
|
|
Fixes #1973
|
|
Handle next event should never block if we have already accumulated
input that we want to process. As we can accumulate new input in
lots of places (everytime we run a shell process for example, we
might end up reading input keys. That can be triggered during the
mode line generation which takes place during display of the window)
Fixes #1804
|
|
|
|
As requested in #1414
|
|
The current client exit status can be specified as an optional
parameter, is nothing is given the exit status will be 0.
Fixes #1230
|
|
|
|
The need to have the array size in the return type was redundant with
the actual list of elements.
|
|
Fixes #1444
|
|
We should never destruct anything through an OptionManagerWatcher
pointer, so having all those destructor virtual makes no sense.
|
|
Introduce Meta::Type<T> to store a type as value, and pass it
around, migrate enum_desc and option_type_name to this.
|
|
|
|
|
|
Modal info style wont be replaced by other info boxes.
NCursesUI will center that info box.
Fixes #1060
|
|
We were not handling keys that could have been generated while handling
other keys (like during a shell evaluation).
|
|
This round trip through an input callback expected to call
is_key_available and get_key was overcomplicated, just send the
keys as they arrive, the client is already buffering due to urgent
event mode.
|
|
|
|
If a shell commands takes more than 1s to execute, a message will appear
on the status line notifying the user, along with the time Kakoune has
been waiting for.
|
|
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.
Fixes #811
|
|
Previous logic worked only when the buffer moved in the window, but
not if some highlighter (like line numbering or flag lines) moved
the text around.
|
|
That avoid sending lots of spurious info_hide/menu_hide, just set
a flag and wait until the client is asked to redraw.
|
|
That way we can force a redraw at any moment, including during
batch execution.
|
|
|
|
Client can now update menu/info positions when the window move
around.
|
|
|
|
Fixes #474
|
|
|
|
We cannot assume Client::m_window is always non-null, as when
changing current buffer its temporarily null, at the point
where WinCreate hook might get called.
Fixes #382
|
|
|
|
* Correctly hide the reload dialog in every client.
* Correctly handle buffer being deleted.
|
|
|
|
|
|
|
|
|
|
Run urgent ones while executing %sh blocks.
Fixes #236
|
|
|