abo-abo / ace-window

Quickly switch windows in Emacs
977 stars 87 forks source link

Horizontally scrolled buffers show no numbers #142

Closed Eeemil closed 5 years ago

Eeemil commented 5 years ago

When a buffer for some reason is horizontally scrolled a bit to the right, the number indicating what window to jump to disappears. This happens for instance when my screen resolution is changed on my computer and Emacs gets confused.

A simple way of reproducing my screenshot:

  1. Start Emacs (GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22, modified by Debian)
  2. Add two new windows (C-x 3 C-x 2)
  3. Move to any window, create a new buffer (C-x b asdf) and enter a really long line.
  4. Scroll a bit to the right (E.g by using M-x horizontal-scroll-bar-mode)
  5. M-x ace-window screenshot from 2018-10-16 15-15-35
abo-abo commented 5 years ago

I think this is related to customizing aw-leading-char-face height. This was recently fixed. Please test if the issue is still reproducible.

Eeemil commented 5 years ago

Sorry, using ace-window-20190204.1347 made no difference.

abo-abo commented 5 years ago

I still can't reproduce the issue. Please add more detailed steps. And try to reproduce with make plain from this repo.

rswgnu commented 5 years ago

The latest commit should have resolved this issue.

Eeemil commented 5 years ago

Thank you for taking your time to look into this issue!

The latest commit fixed this issue for some cases, but introduced errors in other cases. To reproduce: 1.) Start emacs with welcome-screen 2.) M-x horizontal-scroll-bar-mode 3.) Create 3 windows C-x 3 C-x 3 4.) Scroll one or more windows to the right 5.) Call ace-window

gergelypolonkai commented 5 years ago

I have a similar, most probably related issue.

  1. Have two Emacs windows. In the first window have a buffer with a very short line (even no characters at all) and a very long one. Place point at the end of the long line
  2. Switch to the other window and call ace-window (i have configured ace-window to activate even if i have only two windows.)

A message appears in the message area: Beginning of buffer, while my other window scrolls a few lines in a (seemingly) random direction).

rswgnu commented 5 years ago

I know about this and the other issue and am working on a fix as I have free time. I think I have a fix for this one but need to solve the general horizontally scrolled issue also.

On Mar 20, 2019, at 3:26 AM, Gergely Polonkai notifications@github.com wrote:

I have a similar, most probably related issue.

Have two Emacs windows. In the first window have a buffer with a very short line (even no characters at all) and a very long one. Place point at the end of the long line Switch to the other window and call ace-window (i have configured ace-window to activate even if i have only two windows.) A message appears in the message area: Beginning of buffer, while my other window scrolls a few lines in a (seemingly) random direction).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

abo-abo commented 5 years ago

Thanks all, please test.

Eeemil commented 5 years ago

Works like a charm! Thanks @rswgnu and @abo-abo !