abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.32k stars 339 forks source link

ivy-completion-in-region and overlays (hl-line-mode, flycheck) #1016

Open Sarcasm opened 7 years ago

Sarcasm commented 7 years ago

Hello,

When using hl-line-mode (I have global-hl-line-mode enabled in my config), the rendering of the in buffer completions take the face of the current line, see:

image

In this screenshot, one can also see the flycheck error face also propagates through the results.

Is it a known issue with a known workaround? I attempted to modify ivy-display-function without success.

abo-abo commented 7 years ago

Is it a known issue with a known workaround?

I've seen it from time to time, also with show-paren-mode, I think. I'll try to fix it, but can't say it will be soon.

Sarcasm commented 7 years ago

Ok, no problem, I understand that this may be difficult to implement. It's definitely nice to have, but I can live without.

basil-conto commented 6 years ago

Does you still see the issue after commit 7434a792c7b4ace1f138fe4256338e20f49981fc?

Sarcasm commented 6 years ago

It looks better now, but I have the feeling that the global-hl-line-mode overlay is now at the bottom of the candidate list, instead of on the candidate line:

In the screenshot below, you can see the last line message-supersede has the line overlay, it should be the line with the cursor (mes|) that is highlighted.

image

mookid commented 5 years ago

@Sarcasm can you still reproduce this?

I fail to do so on make plain with hl-line-mode activated.

basil-conto commented 5 years ago
  1. make plain
  2. M-xhl-line-modeRET
  3. C-o
  4. (mesC-M-i

hl-line-mode

Reproducible with at least Emacs versions 25-27.

abo-abo commented 5 years ago

@basil-conto Can't reproduce on 26.1 with make plain. The hl-line overlay simply goes away.

basil-conto commented 5 years ago

@abo-abo Are you sure you're typing C-o first so that the cimpletion is not performed at the end of the buffer? Here's what I mean:

  1. make emacs=emacs26 plain
  2. M-xhl-line-modeRET

    2

    Note the lack of an overlay because we are at EOB.

  3. (mes

    3

    Note the overlay does not extend past point because we are at EOB.

  4. C-M-i

    4

    Note the overlay disappears because we are at EOB.

  5. C-gC-o

    5

    Note the overlay extends past point because we are no longer at EOB.

  6. C-M-i

    6

    Note the overlay extends past the in-buffer completions because we are no longer at EOB.

Reproduced with the following Emacs versions:

In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-08-27, modified by Debian built on x86-csail-01
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid

In GNU Emacs 26.1.90 (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-12-19 built on thunk
Repository revision: ab8ed418596da550c79913ccc42e8c3842bca315
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid

In GNU Emacs 27.0.50 (build 91, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-12-17 built on thunk
Repository revision: 2f65525774b6e7edf119db678c9eb78cbb84de6a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid