Skip to content

Commit

Permalink
make vterm-cursor-in-command-buffer-p work when shell buffer is multi…
Browse files Browse the repository at this point in the history
…-line
  • Loading branch information
jixiuf committed Apr 12, 2022
1 parent a940dd2 commit a2f2286
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions vterm.el
Original file line number Diff line number Diff line change
Expand Up @@ -1622,12 +1622,9 @@ More information see `vterm--prompt-tracking-enabled-p' and
"Check whether cursor in command buffer area."
(save-excursion
(vterm-reset-cursor-point)
(let ((promp-pt (vterm--get-prompt-point))
eol)
(let ((promp-pt (vterm--get-prompt-point)))
(when promp-pt
(goto-char promp-pt)
(setq eol (vterm--get-end-of-line))
(<= promp-pt (or pt (vterm--get-cursor-point)) eol)))))
(<= promp-pt (or pt (vterm--get-cursor-point)))))))

(defun vterm-beginning-of-line ()
"Move point to the beginning of the line.
Expand Down

0 comments on commit a2f2286

Please sign in to comment.