mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-12 21:42:13 +08:00

I forgot that 610338cc70 (On undo after execute, restore the cursor position, 2024-12-21) would cause a fallout to tests: It makes us reuse in another place our usual cursor-movement sequences. This causes failures like this (linebreaks added for readability): Testing file pexpects/bind.py:Failed to match pattern: (?:\r\n|\x1b\[2 q)[^\n]*def abc\r\n bind.py:45: timeout from expect_prompt(TO_END + "def abc\r\n") # emacs transpose words, default timeout: no delay Escaped buffer: \x1b[?2004h\x1b[>4;1m\x1b[=5u\x1b=\rprompt 2>echo \rprompt 2>echo abc \rprompt 2>echo def abc\r prompt 2>echo def abc\x1b[?2004l\x1b[>4;0m\x1b[=0u\x1b>\x1b]133;C\x07def abc\r\n\x1b]133;D;0\x07\x1b[?25h⏎ \r⏎ \r\rprompt 3>\x1b[?2004h\x1b[>4;1m\x1b[=5u\x1b= It seems that we don't print anything where we should print something like "\r\n" or "\e[2 q" to move the cursor below the command line. I haven't gotten to the bottom of this but it might be related to terminfo. Once we get rid of that, we can unconditionally print our canonical movement sequences. This issue seems to only affect tests, since fish operates fine in a sourcehut CI system. Let's ignore it for now.