summaryrefslogtreecommitdiff
path: root/modes/vterm
diff options
context:
space:
mode:
authorJakub Kadlcik <frostyx@email.cz>2023-02-10 16:59:04 +0100
committerYoumu <condy0919@gmail.com>2023-02-14 01:18:16 +0800
commitb194fa2e3815891d5ff9a1bcbf40d6c039ba7392 (patch)
tree6f0243a436126ea161bf737abb5a1de3859fd49f /modes/vterm
parent5fbfc359b4a4fb2206130e02cf275a8a1872079e (diff)
vterm: make the `G' button jump to the prompt line
AFAIK `vterm` is basically a square of the size of the whole window it is placed in. As a consequence `M-x count-words` shows 30 lines even for freshly spawned `vterm` with just one line of text. And as a consequence `G` always jumps down to the bottom of the window, even though it is an unused line. This patch changes the behavior and makes `G` jump to the last prompt line. Which in ideal world, should be the last line of the buffer.
Diffstat (limited to 'modes/vterm')
-rw-r--r--modes/vterm/evil-collection-vterm.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/modes/vterm/evil-collection-vterm.el b/modes/vterm/evil-collection-vterm.el
index 0ae150d..a77ee21 100644
--- a/modes/vterm/evil-collection-vterm.el
+++ b/modes/vterm/evil-collection-vterm.el
@@ -278,7 +278,8 @@ But don't allow the cursor to move bellow the last prompt line."
"C" 'evil-collection-vterm-change-line
"s" 'evil-collection-vterm-substitute
"S" 'evil-collection-vterm-substitute-line
- "j" 'evil-collection-vterm-next-line)
+ "j" 'evil-collection-vterm-next-line
+ "G" 'vterm-reset-cursor-point)
(evil-collection-define-key 'visual 'vterm-mode-map
"d" 'evil-collection-vterm-delete