fourier / ztree

Directory tree comparison mode for Emacs
http://www.emacswiki.org/emacs/ZtreeDiff
GNU General Public License v3.0
239 stars 21 forks source link

Feature request: cursor position after refreshing #56

Closed rchar01 closed 6 years ago

rchar01 commented 6 years ago

I think it would be a good feature if the cursor did not change its position after refreshing the buffer (ztree-refresh-buffer). Optionally for the user.

Is it possible? What do you think about it?

fourier commented 6 years ago

Yes its not hard to do and could be useful.

fourier commented 6 years ago

Please test how does it work for you.

rchar01 commented 6 years ago

Works great, thanks.

fourier commented 6 years ago

Closing it then.

rchar01 commented 6 years ago

I noticed a small bug.

Currently, e.g. when the cursor is on the fourteenth directory (ztree-dir), after using the narrow function, we go to the very end of the new directory tree (if there are fewer directories in this folder), and the same with widen.

I think that after using the function narrow/widen the cursor should go to the first position (as before after the refresh function).

What do you think?

fourier commented 6 years ago

Ah it looks like a bug to me. Will take a look at it later.

fourier commented 6 years ago

Now it should be fixed. Please close the issue if it works for you and no other related issues has been found.

rchar01 commented 6 years ago

I don't see anything that needs improvement now, it works great for me. Thanks for the new feature and fixing the bug.