kaktree icon indicating copy to clipboard operation
kaktree copied to clipboard

Changing root doesn't move cursor to the top of the buffer

Open LogFlames opened this issue 4 years ago • 1 comments

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

  1. Open kaktree
  2. Press enter on a folder
  3. 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.

Step 1 After I pressed enter Step 2 After I pressed "j" once Step 3

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

LogFlames avatar Mar 01 '21 12:03 LogFlames

Should be easy to fix by adding gt to the function that changes root

andreyorst avatar Sep 23 '21 18:09 andreyorst