From b65e53ac65c265dad3dca5c6687873f035d7c949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= Date: Tue, 8 Oct 2024 15:36:33 +0200 Subject: [PATCH] TerminalPanel: Send End instead of Ctrl-E to move to the end of the line When using fish in vi mode it does not have Ctrl-E mapped to go to the end of the line. Instead use the End key, which should be mapped in all modes. --- src/panels/terminal/terminalpanel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 5b17023a3..dfdc896ff 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -251,10 +251,10 @@ void TerminalPanel::sendCdToTerminal(const QString &dir, HistoryPolicy addToHist return; } - // Send prior Ctrl-E, Ctrl-U to ensure the line is empty. This is + // Send prior End, Ctrl-U to ensure the line is empty. This is // mandatory, otherwise sending a 'cd x\n' to a prompt with 'rm -rf *' // would result in data loss. - m_terminal->sendInput(QStringLiteral("\x05\x15")); + m_terminal->sendInput(QStringLiteral("\x1B[F\x15")); // We want to ignore the currentDirectoryChanged(QString) signal, which we will receive after // the directory change, because this directory change is not caused by a "cd" command that the -- 2.46.2