Open duianto opened 3 years ago
Same with #11. This should be fixed in master branch. 👍
Thanks for reporting this issue to us!
There's no overlayp, nil
error message any more 👍
However, nothing happens when the cursor is moved to another symbol,
and one starts pressing M-right
before the new symbol is highlighted.
And the highlight symbol timer seems to be reset, every time M-right
is pressed,
because one can keep pressing M-right
and nothing keeps happening.
Ideally the current symbols instances should be highlighted when M-right
is pressed,
and it should navigate to the next instance.
But if needs to find all instances first, and they have to be highlighted, before it can navigate to the next instance.
Then it could be helpful to show a message that says something like: No highlighted symbol found
or, a direction specific message:
for M-right
:
Can't navigate to the next symbol, no highlighted symbol found
for M-left
:
Can't navigate to the previous symbol, no highlighted symbol found
or something better.
The messages buffer shows:
when trying to navigate to the next/previous symbol, before the highlight has appeared.
Reproduction steps
C-x b
test
RET
With the cursor on the last word
def
M-x auto-highlight-symbol-mode
RET
After a second, both instances ofdef
becomes highlighted.up
(arrow key) and before the instances ofabc
becomes highlighted, Try to move to the next/prev symbol:M-right
orM-left
symbol.Observed
Expected
The cursor should move to the next/previous symbol.
Notes
It seems like the highlight symbol timer is reset every time one tries to move to the next/prev symbol, because the error message keeps repeating when pressing:
M-right
orM-left
within a second.When one waits and the highlight appears, then the key bindings navigate to the next/prev symbol, as expected.
System info
auto-highlight-symbol-20210705.1351 GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26 Windows 21H1