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.
This commit is contained in:
Jakub Kadlcik 2023-02-10 16:59:04 +01:00 committed by Youmu
parent 5fbfc359b4
commit b194fa2e38
1 changed files with 2 additions and 1 deletions

View File

@ -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