kaktree
kaktree copied to clipboard
Changing root doesn't move cursor to the top of the buffer
Problem description
When you change root of the tree by pressing enter, the marked line moves to the top of the buffer, but there is also a white cursor showing the "real" position. Pressing "j" moves the blue marked line and the cursor below the position of the cursor and pressing enter opens the file or folder under the cursor.
Steps to reproduce
- Open kaktree
- Press enter on a folder
- Move up or down using j or v
What should happen
Both the cursor and the marked line should be at the same row, avoiding confusion. I would personally prefer if both would be at the top of the buffer.
What happens instead
The "real" position of the cursor is where it was previously.
After I pressed enter
After I pressed "j" once

Environment information
Kakoune version: Kakoune v2020.09.01-339-g7c321e12 OS version: DISTRIB_ID=ManjaroLinux DISTRIB_RELEASE=20.2.1 DISTRIB_CODENAME=Nibia DISTRIB_DESCRIPTION="Manjaro Linux"
sh executable version: GNU bash, version 5.1.0(1)-release (x86_64-pc-linux-gnu)
Running in TMUX
Should be easy to fix by adding gt to the function that changes root