ranger.el icon indicating copy to clipboard operation
ranger.el copied to clipboard

deer-jump-other-window: restore previous buffer?

Open dieggsy opened this issue 8 years ago • 7 comments

It would be nice if deer-jump-other-window would restore the buffer that was there before (if there was one), or otherwise close the window it created on ranger-close.

Currently, it does this thing where regardless of whether there's previously one or two windows, you end up with two windows of the same buffer.

dieggsy avatar Nov 21 '16 03:11 dieggsy

@therockmandolinist, I just submitted some commits which help some of the behavioral issues with deer-jump. Give it a try.

punassuming avatar Mar 16 '17 03:03 punassuming

@ralesi now i just end up with a messages buffer regardless of whether i had a buffer open in the other window (or whether there was another window at all)

dieggsy avatar Mar 19 '17 20:03 dieggsy

This is because of the behaviour of 'other-window' I will add a check for when there are no other windows. Do you have this issue with multiple windows open?

punassuming avatar Apr 05 '17 17:04 punassuming

The behavior for opening deer in other window is the same whether I previously had one or multiple windows open - when I q out, the other window sticks around and goes to some other buffer, not the one it was previously at. Doesn't close if there was no other window before either, just goes to the same buffer.

dieggsy avatar Apr 23 '17 18:04 dieggsy

I don't know if this helps, but the ideal behavior is pretty much exactly that of the *Help* buffer (like describe-variable, describe-function, etc).

dieggsy avatar May 13 '17 22:05 dieggsy

@ralesi Seems like some of the recent commits fixed this, so thanks!

There is another thing though, when deer-jump-other-window is called with a buffer already open in other-window, the following error arises: Debugger entered--Lisp error: (void-variable oth-buf). It still works as expected, regardless. Any thoughts? Should I open a separate issue?

dieggsy avatar May 25 '17 22:05 dieggsy

i'm actually unable to reproduce this for now, although there's still a reference to the undefined variable oth-buf in deer-jump-other-window.

dieggsy avatar May 28 '17 20:05 dieggsy