Skip to content

Add mappable action reverse_scroll_to_cursor - #4634

Merged
kovidgoyal merged 1 commit into
kovidgoyal:masterfrom
page-down:feat-reverse-scroll
Feb 4, 2022
Merged

kovidgoyal merged 1 commit into
kovidgoyal:masterfrom
page-down:feat-reverse-scroll

Conversation

@page-down

Copy link
Copy Markdown
Contributor

For some programs that don't work well, they won't clear the blank lines under the cursor line. This action can be used to reverse the scrolling.

Also adjusted the name of the menu item that clears to the cursor Cmd+K.
Used initial capitalization and simplified the text (as it also works for the cursor prompt).
Moved Reset to the bottom, as this cleans up the most.

Please review if it is appropriate, thank you.

@kovidgoyal

Copy link
Copy Markdown
Owner

I don't follow what's the use case for this action?

@page-down

Copy link
Copy Markdown
Contributor Author

For example, sometimes there will be some blank lines below the cursor at the end of autocomplete, so user can reverse scroll to move the cursor line back to the bottom of the screen.

(scrollback_fill_enlarged_window yes already configured)

Yes, it would be better if these programs could support unscroll escape sequence.

@kovidgoyal

Copy link
Copy Markdown
Owner

Maybe name it something better in that case, so it is more clear what it
does. Perhaps "scroll_prompt_to_bottom" also you cant scroll the top
line of the prompt to the bottom of the screen, that will break multiline
prompts. Instead you would need to detect the last line of the prompt
that is not empty and scroll that to the bottom.

@page-down

Copy link
Copy Markdown
Contributor Author

Maybe name it something better in that case, so it is more clear what it does.
Perhaps "scroll_prompt_to_bottom"

Ok, so far I just moved the line where the cursor is to the bottom, maybe I need to check all the empty lines and reverse scroll.
This doesn't seem to require a prompt check, does it?
Starting from the bottom, count all empty lines.


changelog.rst

:ac:`select_tab`

Is this :ac: something new? Or is it typo?

Also I noticed that there are errors when generating documents.

rm -rf docs/_build/
make dirhtml

shell-integration.rst:51: ERROR: Unknown interpreted text role "env".
shell-integration.rst:56: ERROR: Unknown interpreted text role "env".

@kovidgoyal

kovidgoyal commented Feb 4, 2022 via email

Copy link
Copy Markdown
Owner

@page-down
page-down force-pushed the feat-reverse-scroll branch from b162806 to a1a0c9a Compare February 4, 2022 14:52
@page-down

Copy link
Copy Markdown
Contributor Author

I need to check from the last line, since fish multi-line editing may have empty lines.

Currently there is only one case when the last few lines of a fish multi-line edit are empty lines and will be cleared.
There is no way around this, except not to use it when entering multi-line text.

I saw the latest :ac: role update, which I also used.

These were fixed a while ago, are you up-to-date?

Indeed, I remember reading this env related commit.

@kovidgoyal
kovidgoyal merged commit 89e0abd into kovidgoyal:master Feb 4, 2022
@page-down
page-down deleted the feat-reverse-scroll branch February 4, 2022 15:14
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

Successfully merging this pull request may close these issues.

2 participants