Closed Slind14 closed 3 years ago
I'll add a mark2rc.properties setting to let you dictate how many lines will be scrolled at a time this weekend.
Would it be possible to use the actual lines displayed or does mark2/urwid not know how many that are?
Yes, but I'd rather not do drastic changes that will confuse the rest of the mark2 users.
Pull Requests are welcome :smile:
Ok so... upon checking the urwid documentation, it's totally possible. So here are my proposed changes:
alt + page up/down = Scroll text a whole page. something else + page up/down = Scroll text a half a page.
sounds good, alternative suggestion:
page up/down
entire pages
arrow keys up/down
single lines
The advantage I see is that users don't need to read the doc (if documented) as it is standard procedure, with all great tools like vim.
up/down arrows
already move through command history, it would have to be another combination.
how about alt+up/down arrows
?
I might be wrong, but up and down arrows are only going through the command history while the command prompt is highlighted. In the case of scrolling the console stream it is automatically highlighted and therefor "should" work. Ofc this would mean that it needs to be initiated by a mouse click on the console stream, a page up key or something else to work. My opinion is to keep it as simple as possible and as close to common procedures.
Oh man, I totally forgot about this. I'll work on it as soon as possible
I'd suggest ctrl instead of alt. Ctrl does similar functionality to this in browsers. In chrome, for example, you can use ctrl+page up/page down to move up and down a page, even when your text cursor is in a textbox.
Shift+page up/page down (and home/end) is usually used for text selection, and alt is generally avoided due to alt being commonly used for opening system menus(alt+space opening window options, alt and then down opening the file menu, alt and then a letter opening specific menus, etc).
Implemented in https://github.com/gsand/mark2/commit/26265373f1d2b67369582daa00a9196499a4a2d3
The focus issue was not a problem, you already needed to click the prompt in order to scroll lines, so using the arrow keys to scroll a line works fine.
It did end up conflicting, changed to use Alt + Up/Down
to scroll individual lines. Using ctrl + up/down
was not working properly.
Please note: Scrolling line by line in urwid
might take time for it to register you want to scroll up (has to traverse the buffer a bit). The ListBox is doing all the scrolling, so mark2 can't fix this. A simple workaround is to spam pg-up a few times and then do lines once it actually moves.
https://github.com/gsand/mark2/commit/e28f771703bb978cb712da7961c75603d0efffc2
Hey, would it be possible to let the page up/down scroll pages and not just a few lines? Idk, if it would be difficult regarding re-sizing. I really miss it from being used to screen, tmux, byobu.