Subject: bug#16017: 24.3.50; windmove is broken

From: Dmitry Gutov <[email-masked]>
Date: Wed, 04 Dec 2013 02:58:24 +0200

On 03.12.2013 13:44, martin rudalics wrote:
> IIUC the bug happens only in a window whose subwindow does not have an
> integral number of lines like in a maximized frame.  Is that correct?

Seems so. On my machine, the problem is there when the window is 
maximized (and the frame has non-integral number of lines), but 
disappears when Emacs is in fullscreen mode, without window borders and 
everything (then the frame height looks evenly divisible by line height).

> In the long run I'd like to use `window-in-direction' here because it
> doesn't suffer this problem. Meanwhile I can offer the attached patch
> (although I'm not sure whether it is really better than customizing
> `windmove-window-distance-delta').

The patch works, except it doesn't let me move to the minibuffer window 
when it's active, and doesn't say so when the minibuffer is inactive 
(and it should, according to `windmove-do-window-select'). Changing the 
value of `windmove-window-distance-delta' doesn't help with it either, 
so looks like the patch is indeed equivalent to that.

> BTW: If you want to test `window-in-direction' directly you can try the
> following instead:

Thank you, this is better. The minibuffer is selectable this way, and 
other cases of window navigation work, too.

The "no window there" feedback is non-existent (error "Wrong type 
argument: window-live-p, nil"), but that's to be expected, I guess.