-
Notifications
You must be signed in to change notification settings - Fork 715
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
Allow scrolling past the main cursor in the view mode #3128
Comments
Strongly related to #2844 |
So, do you think the view should push the cursor? Or should the cursor stay put, and have the view snap back to the cursor on a normal key press? |
Behave like the scrolling in web browsers, don’t allow interacting with selections in the view mode. |
As far as I understand, currently there are 2 kinds of scrolling. One restores all cursor selections after scrolling ( I see this issue fixed in following ways:
I think I could get my hands on either of two last variants, but not confident enough to try implementing the first. Any opinions on this? |
I actually did implement 3rd option locally and scroll command in my config looks like this: define-command -params 2 scroll %{ execute-keys %sh{
if [ $1 = "down" ]; then
if [ "$kak_window_top" = "$kak_cursor_line" ]; then
echo "<space>;${2}j${2}vj"
else
echo ${2}vj
fi
elif [ $1 = "up" ]; then
if [ "$(($kak_window_bottom))" = "$kak_cursor_line" ]; then
echo "<space>;${2}k${2}vk"
else
echo ${2}vk
fi
fi
} }
map global normal <a-j> ': scroll down 5<ret>'
map global normal <a-k> ': scroll up 5<ret>' I added window_top, bottom, left and right builtin variables. However, I only see this as a temporary solution and think that core scrolling function should be reworked. |
@mawww Can you reopen the issue? It’s too easy to destroy crafted selections with mouse scrolls and clicks (when activating a window, it also sets the selection) or keyboard scrolls (e.g. You can see how scrolling past the main selection behaves in Dance for example. It works well, as Dance notifies you with hidden selections (see #2727 for a screenshot). Helix also highlights line numbers, so you can see where the main and other selections reside. |
https://discuss.kakoune.com/t/view-mode-movement/745/4
The text was updated successfully, but these errors were encountered: