Skip to content
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

Fix backtrace on doubleclick in vterm #715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunlin7
Copy link

@sunlin7 sunlin7 commented Apr 11, 2024

Hi,

Backtrace happened when I double click in a vterm,
it caused by (mouse-set-point event..) return nil for "double-mouse-1" event,
then lead the count-words failed with nil.

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
count-words(nil 370)
(= (count-words pt (point-max)) 0)
(if (= (count-words pt (point-max)) 0) (vterm-reset-cursor-point) pt)
(let ((pt (mouse-set-point event promote-to-region))) (if (= (count-words pt (point-max)) 0) (vterm-reset-cursor-point) pt))
vterm-mouse-set-point((double-mouse-1 (#<window 335 on Default-multivterm-1> 193 (1273 . 277) 105236234 nil 193 (63 . 6) nil (13 . 19) (20 . 43)) 2) 1)
funcall-interactively(vterm-mouse-set-point (double-mouse-1 (#<window 335 on Default-multivterm-1> 193 (1273 . 277) 105236234 nil 193 (63 . 6) nil (13 . 19) (20 . 43)) 2) 1)
command-execute(vterm-mouse-set-point)

This patch will fix the backtrace.
Please help review and merge the changes.

@sunlin7 sunlin7 changed the title Fix backtrack on doubleclick in vterm Fix backtrace on doubleclick in vterm Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant