evilmi--simple-jump: appears to be broken in visual-state
mohkale opened this issue · 5 comments
For example, given a buffer containing the following contents
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
(setq package-user-dir "~/.emacs.d/bin/elpa/")
and my cursor on the opening parenthesis of the setq
call, if I run M-x evilmi--simple-jump
my point correctly goes to the matching closing parenthesis. however if I'm in evil-visual-state
on the opening paren and run M-x evilmi--simple-jump
my point only goes upto the t
in setq
.
I'm on GNU Emacs 27.0.60 (build 1, x86_64-w64-mingw32) of 2019-12-28
, running Evil version 1.13.0
and evil-matchit version 20191023.2322
.
S.N. Also, not to be pedantic, but is there a reason evilmi--simple-jump
has a double dash? I was under the impression only functions the user isn't expected to call should be named like that.
Seems to me like the issue lies in evilmi--get-char-under-cursor
. Specifically the (following-char)
call. Looks like in evil-visual-state
point is being returned as one character past where it actually is. I'm curious why this isn't an issue with the regular, smart jumping system.
double dash means this function is internal. You should use evilmi-jump-items
instead.
oh, I was under the impression that because it was interactive
that it wasn't internal. My bad.
So there's no command to jump using the behavior of (setq evilmi-always-simple-jump t)
without being forced to always simple jump?
interactive
is only for debugging. I forgot to remove it. need read code history to understand evilmi-always-simple-jump
. Currently it's used only once on python related thing.
I will add some unit test and review the code of evilmi--simple-jump
this weekend.