Skip to content

Fix backtrace on doubleclick in vterm #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions vterm.el
Original file line number Diff line number Diff line change
Expand Up @@ -1166,12 +1166,9 @@ Argument ARG is passed to `yank'"
But when clicking to the unused area below the last prompt,
move the cursor to the prompt area."
(interactive "e\np")
(let ((pt (mouse-set-point event promote-to-region)))
(if (= (count-words pt (point-max)) 0)
(vterm-reset-cursor-point)
pt))
;; Otherwise it selects text for every other click
(keyboard-quit))
(if (> (count-words (posn-point (event-end event)) (point-max)) 0)
(mouse-set-point event promote-to-region)
(vterm-reset-cursor-point)))

(defun vterm-send-string (string &optional paste-p)
"Send the string STRING to vterm.
Expand Down