GNOME Bugzilla – Bug 118967
single line scrolling with "Ctrl+Shift+ArrowUp/ArrowDown"
Last modified: 2007-11-27 12:38:21 UTC
Description of Problem: the full page scrolling with Shift-PageUp/PageDown is not always ideal ... Sometimes you really need to just scroll 1 or 2 lines more and the text is placed perfectly within the shell window. it would be nice to implement single line scrolling with the Shift-ArrowUp/ArrowDown keys while still keeping the full page scrolling with Shift-PageUp/PageDown combination. single (or user configurable) line scrolling with the mouse wheel would be really nice too - i just lose my place on every scroll with the the half-page -at-a-time scrolling in 2.2.1!! hope im not being too picky ... pantz
*** Bug 96753 has been marked as a duplicate of this bug. ***
*** Bug 123985 has been marked as a duplicate of this bug. ***
*** Bug 131090 has been marked as a duplicate of this bug. ***
Created attachment 31251 [details] [review] pacth of vte.c Modification off vte.c to implement single line scrolling with the Shift-Up/Down keys.
pacth = patch off = of ;)
Moving to vte, where it will happen. This looks ok to me, and people ask for it way too often. Can we have this, Nalin?
*** Bug 147757 has been marked as a duplicate of this bug. ***
Created attachment 34708 [details] [review] updated patch of vte.c Modification off vte.c to implement single line scrolling with the Shift-Up/Down keys. (Updated)
*** Bug 161755 has been marked as a duplicate of this bug. ***
Mauricio's patch works fine, I am attaching an updated one to current CVS (and not Reversed like the previous one). This would be handy to go in..
Created attachment 48162 [details] [review] Mauricio's patch - Updated to today's CVS
*** Bug 309773 has been marked as a duplicate of this bug. ***
why is this useful enhancement just lying around since 2003 (I made a patch available in early 2004 and its early 2006 now)? I tried to move back to gnome 2.14 and I still find this annoying thing not fixed. Can we get it out please?
I don't like the patch as it stands. shift+up/down is handles in vim for scrolling pages up/down. This breaks that. I'm willing to accect an updated patch that does either of these: 1) Use ctrl+shift+up/down 2) If no scrolling happens as a result of shift+up/down, do not handle the event and pass it on, such that vim will still work. I personally prefer the latter.
you are kidding right? why is shift+up/down scrolling pages and why pg-up/down not doing that for vim? That looks ugly from a usability point of view. does that behaviour need enabling in VIM, because I don't see it in my install. If anything, shift+up/down should scroll one line up/down a la ctrl-e. I have never heard any program doing pg-up/down with shift+up/down. Does anybody else here think that VIM doing page scrolling with shift+up/down, instead of pageup/pagedown, is good usability? And we should sacrifice a pretty standard behaviour of the terminal for that?
No, I think *you* are kidding. What makes your favorite feature "a pretty standard behaviour of the terminal"? VIM or not, adding keybindings to terminal needs real justification, as by default, a terminal is supposed to pass everything to the pty running inside.
look at other terminals...Its not my favourite feature, its present (or has the option of configuring) in almost all of them. real justification is that many times you wanna see a whole paragraph in terminal at the same time. Its not possible in gnome-terminal without this patch. what is your justification for not allowing it?
When I press shift+up/down in xterm, all I get is "A" and "B" character in my terminal. My justification is that we should not break what has been working previously, hence my proposal. With my second proposal in comment 14, we will be both happy. I don't see why don't you simply implement that instead of arguing.
Put this in your ~/.Xdefaults and you will have the line scrolling. XTerm*VT100.Translations: #override \ Shift <Key>Up: scroll-back(1,line) \n\ Shift <Key>Down: scroll-forw(1,line) \n Try konsole or mrxvt (functionally closer to gnome-terminal than xterm). They have line scrolling by default. Your justification is not valid because this patch doesn't break anything. VIM doesn't come with the feature you mentioned enabled by default. And it has simpler alternative. There is no simpler alternative for me to see the coherent parts of my terminal text with gnome-terminal. And its not even configurable (like xterm).
The vim that comes with both Fedora and Ubuntu does this by default, just tested. Let me repeat again, my second suggestion in comment 14 does make both you and me happy. If you keep insisting on committing the patch as it stands now, lemme make it clear, I'm not going to commit that in vte. gnome-terminal can add a configurable binding for what you want.
aah, I remember. its this kind of annoying, unadaptive and unreasonable rejections that drove me away from gnome in the first place. so, we get a maintainer for vte who likes to page up with shift+up, not with page-up, so much that he is not ready to sacrifice it for what appears to be a more standard feature of the terminal, which he is supposed to enhance with people's requests for features, not with what he is comfortable with. well, I think I argued enough. I will stay away. Thanks for listening to my rants. And I apologize to you if I hurt you (or anyone else here) in anyway. I am out.
Being a maintainer means more than committing whatever patch that comes in. If you are not willing to improve your patch, no problem, it will be committed when somebody finally spends time improving it. No, I don't like page up with shift+up, the same way as I don't like shift+insert to paste PRIMARY instead of CLIPBOARD. But I did decide to let shift+insert paste PRIMARY because that has been what it was doing for a long time. None of them are my preference, and being a maintainer is not about applying your own preference either. I think I suggested a resolution enough times too. If you are here to flame only, no problem, and nothing lost if you don't. But if you are here to help, I told you three times how you can.
I helped by providing a patch two years ago (search for the duplicates). Its non-sense like what you mentioned about vim that keeps me thinking that its maintainer's preference, not what is right! Do you think if you were using konsole or mrxvt, VIM will suddenly be unusable? xterm, konsole, mrxvt have broken (according to only one person on this planet, and that's you) VIM for so many years, why not add gnome-terminal to that list, when it solves a major usability issue for gnome-terminal's consumers. Being able to see a consistent part of terminal text with keyboard is a major usability concern for people who don't use mouse. There is no solution that g-t/vte provides. And there is a solution for *your* VIM problem.
I'm one of the authors of a bug merged with this and have been watching your argument while wishing I did not have to use `less(1)' more. The good old days with kconsole or whatever were better. So I'm putting forward this suggestions. A (too) brief perusal of the web suggests ANSI standard terminals have no support for combinations of control keys. Perusal of vim63/doc/quickref.txt shows no use of control- shift. Perusal of emacs appears to show only no-standard use of control-shift. The gnome terminal already intercepts control-shift N, T, C, and V. Control- shift-page{up,down} appear to work the same as shift-page{up,down}, for whatever reason. Separation of concerns suggest some set of keys be given over to the terminal emulator, and the above suggests it should be the control-shift keys. So my suggestion is, make control-shift-{up,down,pageup,pagedown} the scrolling keys. In any case, please do something, as the feature you are not implementing is much more useful than vim's use, which seems to be duplicated by vim page{up,down}.
Created attachment 71739 [details] [review] Mauricio's patch, brought back to HEAD, and using Control+Shift+Up/Down This updates the patch to HEAD as of today, with the added tweak that it now uses Control+Shift+{Up,Down} instead of plain Shift+{Up,Down}. I prefer this to the other option in Behdad's comment 14, because (i) Control+Shift is used all over the terminal keybindings already and (ii) keybindings that change meaning depending on context make me scary, and reacting differently when there is nothing to scroll is a change of meaning. (That's the likely rationale behind the current terminal's eating the Control+Page{Up,Down} at the {first,last} tab, for example...)
BTW, the patch I just posted adds a few lines to .cvsignore, too.
Thanks Mariano!
Behdad, Did Mariano's new patch ever get commited?
removing myself. 3 years is a long time for applying a basic patch...;-)
*** Bug 437326 has been marked as a duplicate of this bug. ***
Created attachment 88822 [details] [review] half page scrolling Hello, I think the whole reason for this bug is vte not following the standards laid down by xterm. Shift+{Up,Down} = 1/2 page up or down. That's useful, 1 full page is not. Scrolling half pages keeps the context visible while more content is displayed, and there's less vertical distance for the eyes to move to keep reading everything, on a 21 inch monitor anyway ;) Anyway, to get 1/2 page scrolling, it was easiest to modify the last patch, (new patch is still only against vte-0.13.7) and may as well keep single line scrolling, and kill vte_terminal_scroll_pages(). However I couldn't get that to work, Control+Shift+{Up,Down} just printed A's B's on the terminal, so I changed it to just Shift+{Up,Down} which works for me. BTW, Shift+{Up,Down} to page up/down in VIM does not make any sense. It should be (and is actually on Debian) Page{Up,Down}. Also I couldn't for the life of me see where the mouse wheel scrolling comes from, it goes through a different mechanism and still has full page scrolling, even after removing vte_terminal_scroll_pages()... I'm not expecting this to be commited or anything, it's just for the next person like me crawling around the web wasting a Friday night trying to get a usable terminal. Laurence
doh... I meant Shift+Page{Up,Down} = 1/2 page up or down. Even the linux virtual terminals (Ctrl+Alt+F1 etc) do that. Also I really need half page mouse wheel scrolling, that might be controlled by gnome-terminal, but I can't see where though. Does anyone know? Thanks.
Created attachment 89013 [details] [review] half page mouse scroll too! Ok, I found where the mouse scrolling is, I'm happy now...
2007-11-27 Behdad Esfahbod <behdad@gnome.org> Bug 118967 – single line scrolling with "Ctrl+Shift+ArrowUp/ArrowDown" Patch from Mauricio and Mariano Suárez-Alvarez * src/vte.c (vte_terminal_scroll_lines), (vte_terminal_scroll_pages), (vte_terminal_key_press): Implement single-line scroll.