hey!
this is my first PR, so feedback is greatly appreciated as I am a new contributor and not super familiar with the codebase.
I noticed a bug with avy-goto-line with the newer dispatch action features.
Example of these bugs:
Let's assume M-g is set as avy-goto-line.
If you press M-g X dj (kill-stay), you are expected to kill the line marked by dj, and stay at the current position of the point. What actually happens is you kill the line and go to the line as well. This is because (avy-action-goto r) is called regardless of whether a dispatch action has been set.
Another example is M-g t dh (teleport), which should teleport the selected line at dh to the current point position without moving the point. In this situation, the selected line is transported to the point position, but the point is still taken to the original selected line position at dh. Again, this is because (avy-action-goto r) is called regardless of the action set in avy-action
The solution I came up with is to only call avy-action-goto when avy-action has been left to its default value set in avy--line of #'identity
hey! this is my first PR, so feedback is greatly appreciated as I am a new contributor and not super familiar with the codebase.
I noticed a bug with
avy-goto-line
with the newer dispatch action features.Example of these bugs: Let's assume
M-g
is set asavy-goto-line
.If you press
M-g X dj
(kill-stay), you are expected to kill the line marked bydj
, and stay at the current position of the point. What actually happens is you kill the line and go to the line as well. This is because(avy-action-goto r)
is called regardless of whether a dispatch action has been set.Another example is
M-g t dh
(teleport), which should teleport the selected line atdh
to the current point position without moving the point. In this situation, the selected line is transported to the point position, but the point is still taken to the original selected line position atdh
. Again, this is because(avy-action-goto r)
is called regardless of the action set inavy-action
The solution I came up with is to only call
avy-action-goto
whenavy-action
has been left to its default value set inavy--line
of#'identity
Thanks! Let me know what you think.