mattboehm / vim-accordion

A vim window manager for people who love splits
101 stars 3 forks source link

When pane is un-shrunk, the view may have changed #29

Closed mattboehm closed 10 years ago

mattboehm commented 10 years ago

Open 3 files, go to rightmost file, move cursor to middle line (preferably a long line), call :Accordion 2, move left twice, move right twice. Line with cursor is now on the top.

This happens because when lines are shrunk, they become 1 column wide, so the entire window is only showing part of the cursor line, which fills the viewport from top to bottom.

There might be some way to use winsaveview() and winrestview() to fix this.

mattboehm commented 10 years ago

I took a first stab at this and it did not work as expected. This is probably just an issue of me saving or restoring the views at the wrong time as I've confirmed that restoring the view should shift it over.