Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent cursor behavior during staging #1028

Closed
Perlence opened this issue Jul 25, 2020 · 0 comments
Closed

Inconsistent cursor behavior during staging #1028

Perlence opened this issue Jul 25, 2020 · 0 comments

Comments

@Perlence
Copy link

Perlence commented Jul 25, 2020

Hello! I've discovered that if I stage a file when the index is empty, the cursor goes down. For example, after staging status the cursor moves down to init.vim:

However, if I stage a file when the index is not empty, the cursor goes up. For example, after staging init.vim the cursor moves up to tmux-sessionist:

It's a bit confusing, is this behavior intended? I think a more friendly way would be always moving the cursor down on staging unless it's the last entry in the group (staged or untracked files).

I see this behavior on tig v2.3.0 and on the master branch.

koutcher added a commit to koutcher/tig that referenced this issue May 15, 2022
In the status view, when the `Changes to be committed` section is empty,
a line with `(no files)` is inserted. This line disappears when the fist
file is staged, this has to be taken into account for the cursor position.

Fixes jonas#842, jonas#1028
koutcher added a commit to koutcher/tig that referenced this issue May 15, 2022
In the status view, when the `Changes to be committed` section is empty,
a line with `(no files)` is inserted. This line disappears when the first
file is staged, this has to be taken into account for the cursor position.

Fixes jonas#842, jonas#1028
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants