Comments (9)
Sometimes, it'll highlight it all correctly, and sometimes, it'll highlight it all wrong. This is an example where part of the highlighting is wrong.
Closing as not reproducible. If you manage to reliably reproduce it, please reopen.
from avy.
@tsdh You've reproduced this, right?
from avy.
@PythonNut @abo-abo Yes, I can with the current avy version and emacs -Q. See the two screenshots which also contain the recipe.
As you can see, the overlays in the ;;
preceding the lisp comment at the top of the buffer are correct, i.e., every matching char is shown in blue. This should also happen to the long semicolon sequences below but there blue and red alternate.
In contrast to @PythonNut, this is completely reproducible and deterministic here. Or wait, it depends on length of, well, I don't really know. All I can say is that THIS is displayed correctly
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
while THIS isn't
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;
The difference is just that the latter has one semicolon more in the last line...
from avy.
See the two screenshots which also contain the recipe.
I'd prefer not to copy sensitive text from the screenshot. Could you just paste the whole text here?
from avy.
Yes, of course. Consider this test file avy-bug.el
.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
Then start emacs like so: emacs -Q -l ~/path/to/avy/avy.el --eval "(setq avy-style 'de-bruijn)" ~/avy-bug.el
and do M-x avy-goto-char RET ;
and you'll get the wrong highlighting.
As soon as you delete one single ;
(no matter in which line) and try to jump to ;
again, the highlighting is correct.
Oh, it's actually the same when you put the contents all on the same line, or break it into 10 or 20 lines, or add spaces in between, etc.. So with the avy defaults, at most 81 consecutive (with only arbitrary whitespace in between) matches work, with 82 and up it doesn't anymore.
Hm, what's 81 for a magic number? Well, by default avy-keys
has the length 9, and 9^2
is 81...
from avy.
Can you check again? I think this could be fixed.
from avy.
No, I'm sorry, it's still wrong in the same way as explained in my last comment: 81 consecutive matching chars => everything's ok, 82 consecutive matching chars => wrong highlighting.
from avy.
The bug was caused by the assumption that overlays-in
is sorted (which it was randomly). Please check if it's fixed now.
from avy.
Yes, it is fixed. Thanks a lot!
from avy.
Related Issues (20)
- avy-goto-char-timer: indicate somehow when match is unique HOT 1
- Feature request: a counterpart to 'avy-isearch that works with the "ctrlf" package HOT 1
- temporarily use all windows HOT 1
- Have an 'avy-org-refile-as-sibling' alternative to 'avy-org-refile-as-child'
- de-Bruijn candidate selection may fail when `avy-single-candidate-jump` is `nil` HOT 1
- How could I make a three char version of a command such as "avy-goto-char-2-below"?
- avy-goto-end-of-line does not respect the avy-styles-alist HOT 1
- Support always on "hats" style jumping HOT 3
- Reverse the order of key-labels for avy-goto-*-above HOT 2
- Avy's upstream and its version in elpa.git diverged
- Dimming buttons and headers HOT 1
- First char not highlighted
- Is there a workaround for shifted characters in variable-pitch-mode? HOT 1
- avy-copy/move-line/region expects a keystroke on emacs 28 HOT 2
- add-text-properties can be called on empty string
- Contribution Guidance Request: avy-goto-char-timer populate lead key face automatically
- How do I "activate" the avy-org-* commands?
- avy-dispatch-alist to invoke "isearch-forward-symbol-at-point" on C-s HOT 2
- What does de-bruijn style do? HOT 1
- avy-goto-char-2 display overlays after first character like Neovim's leap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avy.