Skip to content

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
@sunlin7
Copy link
Author

sunlin7 commented Nov 23, 2024

Hi @jamescherti can you help review this change? Thank you.

@sunlin7
Copy link
Author

sunlin7 commented Mar 7, 2025

Hi @Sbozzolo please help review this MR, Thank you!

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.

1 participant