Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiper match face dot shown #1928

Closed
Ergus opened this issue Feb 10, 2019 · 8 comments
Closed

Swiper match face dot shown #1928

Ergus opened this issue Feb 10, 2019 · 8 comments

Comments

@Ergus
Copy link
Contributor

@Ergus Ergus commented Feb 10, 2019

Hi:
This is a small issue, but any way I considered important to report it.

After the fixes of #1921 and #1923, now the match part of the candidate is not highlighted when the match was outside the screen (in the terminal). The line is highlighted properly, but the match part not. The candidates that are already on the screen have the match part highlighted right, and when they are selected the match remain highlighted properly and the one that was not, becomes right. This always happen when the candidate is outside the screen in the terminal.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Feb 12, 2019

I don't understand. Please add a small example to reproduce.

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2019

  1. make emacs='emacs -nw' plain

  2. C-xC-fivy.elRET

  3. C-sivy

  4. Repeat C-n until a candidate that was not originally visible in the window is selected.

    4-redisplay

    Note how ivy-read, ivy-next-line, and ivy-previous-line are fontified in the minibuffer but not in the original buffer.

@abo-abo abo-abo closed this in dfeaec0 Feb 12, 2019
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Feb 12, 2019

Thanks, all. Please test.

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2019

Thanks, that's fixed the fontification issue for me. I was never able to reproduce the flashing that @Ergus reported (even with recenter-redisplay set to its default tty), though, so their testing is more important than mine.

@Ergus
Copy link
Contributor Author

@Ergus Ergus commented Feb 12, 2019

Yes, this also fixed it for me. Very thanks!!
On the other hand @basil-conto the problem affects me because I use emacs in the terminal (xterm). I you don't have the problem in a terminal, please, tell me what emmulator do you use to try it.

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2019

the problem affects me because I use emacs in the terminal (xterm)

I know. I too was using Emacs under a text terminal for the purposes of this issue, both Emacs 26 and latest master.

tell me what emmulator do you use to try it

gnome-terminal

@Ergus
Copy link
Contributor Author

@Ergus Ergus commented Feb 12, 2019

I just tried gnome-terminal for this and the flash when recentering (C-l) is still there (I am in emacs 26.1 from arch linux). Except of course if I set recenter-redisplay to nil.
This issue was in fact reported and fixed in bug#31325 so maybe the fixed will be not needed after emacs 27 will be released.
In my huge ignorance I would like to understand why:

  1. Redisplay flickers so notably for me.
  2. Why recenter works perfectly without redisplay.
  3. What specific situation makes that recenter comes with redisplay by default (or why).
    But I just started reading the emacs display engine code...

@basil-conto
Copy link
Collaborator

@basil-conto basil-conto commented Feb 12, 2019

But I just started reading the emacs display engine code...

Good luck. ;)

Sorry, I'm sure neither why your terminal flickers, nor why mine stopped flickering many moons ago.

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
…erminal

`window-start' and `window-end' is not reliable when in a terminal. It
can be made reliable if a `redisplay' is performed, but then we get
annoying blinking.

So let's define `window-start' as the location of `window-height'
lines above `point'. We may add a few extra overlays here and there,
but the performance shouldn't suffer, since the area is roughly equal
to the window size anyway.

Fixes abo-abo#1928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants