centered-cursor-mode.el
centered-cursor-mode.el copied to clipboard
doesn't work with multiple windows on the vertical axis
Given the windows A and B, where A is taller than B:
┌────────┐
│ ****** │ <-- Cursor skewed towards the top
│ A │
│ │
├────────┤
│ B │
└────────┘
The cursor rests on the *****
position, which is skewed towards the top rather than centered.
Expected behavior:
┌────────┐
│ │
│ ****** │ <-- Centered cursor on window A
│ │
├────────┤
│ B │
└────────┘
This is on the dev
branch
Update:
The bug happens with the previous window configuration and then opening a completion buffer (such as M-x
with Ivy/Swiper/Helm/Counsel...)
pls fix, or give me a hint to fix it
Funny scenario:
┌────┬────┐
│ │ │
│ A │ B │
│ │ │
├────┴────┤
│ C │
└─────────┘
go to A, open a completion buffer such as M-x
and then escape it with C-g
or something, you get the bug.
now go to B, open the completion buffer again and escape it, the cursor is centered again.
Another update:
This happens when the windows (that are "on top" of each other, like A
and B
in the first diagram) have the same buffer open. With different opened buffers it does not happen.
I think I know what you mean and I think I have fixed this in the dev branch (https://github.com/andre-r/centered-cursor-mode.el/tree/dev). I you try it, know that customization (variables) names have changed and at the end of the file will always be recentered (for now).