Commit Graph

6 Commits

Author SHA1 Message Date
ridiculousfish
25ac5bdb49 Fix the undo pexpect
Add the missing expect_prompts to reflect where we send newlines.
2024-06-02 14:17:36 -07:00
Fabian Boehm
0bb0934bc2 tests: Remove weird triplicated string
I have no idea why this matches the string thrice when it is entered
once and suggestions are disabled.

I've seen this fail even on my local system, I expect it works because
of some terminal integration.
2024-04-23 19:40:49 +02:00
Johannes Altmanninger
edb5cb7226 Fix restoring cursor position on redo with edit groups 2024-04-13 14:36:11 +02:00
Johannes Altmanninger
d1a4b4bc73 Fix undo pexpect test
The assertions were satisfied even though we never triggered any undo.
2024-04-13 11:34:36 +02:00
Johannes Altmanninger
c3cd68dda5 Process shell commands from bindings like regular char events
A long standing issue is that bindings cannot mix special input functions
and shell commands. For example,

    bind x end-of-line "commandline -i x"

silently does nothing. Instead we have to do lift everything to shell commands

    bind x "commandline -f end-of-line; commandline -i x"

for no good reason.

Additionally, there is a weird ordering difference between special input
functions and shell commands. Special input functions are pushed into the
the queue whereas shell commands are executed immediately.

This weird ordering means that the above "bind x" still doesn't work as
expected, because "commandline -i" is processed before "end-of-line".

Finally, this is all implemented via weird hack to allow recursive use of
a mutable reference to the reader state.

Fix all of this by processing shell commands the same as both special input
functions and regular chars. Hopefully this doesn't break anything.

Fixes #8186
Fixes #10360
Closes #9398
2024-03-23 10:06:11 +01:00
Johannes Altmanninger
9f4255ed76 Add simple pexpect test for undo
This acts really strange, I haven't yet figured out why, but I guess it's
a start.
2021-01-07 23:53:31 +01:00