summaryrefslogtreecommitdiffstats
path: root/desktop-plasma/patches
diff options
context:
space:
mode:
authorWolfgang Müller2024-10-09 15:32:30 +0200
committerWolfgang Müller2024-10-09 15:32:30 +0200
commit0065fe8446ca0e96958ed790c314461c469f4b88 (patch)
tree3ee0fa768672ada398659407ec8b01d475a31498 /desktop-plasma/patches
parent80eb420cb3db4c340343f25f7765fed1a02447df (diff)
downloadportage-roles-0065fe8446ca0e96958ed790c314461c469f4b88.tar.gz
desktop-plasma: Patch kde-apps/dolphin terminals with fish in vi mode
Dolphin's built-in terminal follows the working directory by injecting a cd command. It needs to make sure the line is empty first and sends ^E^U. This fails when using the fish shell in vi mode as ^E is not bound in that mode. Add a patch for Dolphin that has it use End instead.
Diffstat (limited to 'desktop-plasma/patches')
-rw-r--r--desktop-plasma/patches/kde-apps/dolphin/0001-TerminalPanel-Send-End-instead-of-Ctrl-E-to-move-to-.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/desktop-plasma/patches/kde-apps/dolphin/0001-TerminalPanel-Send-End-instead-of-Ctrl-E-to-move-to-.patch b/desktop-plasma/patches/kde-apps/dolphin/0001-TerminalPanel-Send-End-instead-of-Ctrl-E-to-move-to-.patch
new file mode 100644
index 0000000..6b11063
--- /dev/null
+++ b/desktop-plasma/patches/kde-apps/dolphin/0001-TerminalPanel-Send-End-instead-of-Ctrl-E-to-move-to-.patch
@@ -0,0 +1,33 @@
+From b65e53ac65c265dad3dca5c6687873f035d7c949 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= <wolf@oriole.systems>
+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
+