-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
[features-] fix cursor index in hide-uniform-cols #2578
Conversation
Does it work to just call |
It almost works, but the problem is in one of the
It seems like What's the right solution here? |
Hmmm...does |
0b0e168
to
45feb70
Compare
45feb70
to
d52502c
Compare
The
For example, it can be triggered on a standard TsvSheet by pressing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
Closes #2577.
Repro case:
echo "a,a\n1,1\n1,1" |vd -f csv
then move the cursor to the right column, thenhide-uniform-cols
:In this PR, I do the cursor move in
hide_uniform_cols()
, not insideColumn.hide()
. That's because I think ofhide()
as a low level width adjuster that does not conceptually involve the cursor, and we don't want to be callingcalcColLayout()
in it unnecessarily. Or does that leave the door open for a repeat of this error with other callers ofColumn.hide()
?