After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 118967 - single line scrolling with "Ctrl+Shift+ArrowUp/ArrowDown"
single line scrolling with "Ctrl+Shift+ArrowUp/ArrowDown"
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Behdad Esfahbod
VTE Maintainers
: 96753 123985 131090 147757 161755 309773 437326 (view as bug list)
Depends on: 399057
Blocks:
 
 
Reported: 2003-08-03 01:37 UTC by pantz
Modified: 2007-11-27 12:38 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
pacth of vte.c (2.15 KB, patch)
2004-09-04 07:00 UTC, Mauricio
none Details | Review
updated patch of vte.c (1.99 KB, patch)
2004-12-10 19:36 UTC, Mauricio
none Details | Review
Mauricio's patch - Updated to today's CVS (2.11 KB, patch)
2005-06-22 15:24 UTC, Michele Baldessari
needs-work Details | Review
Mauricio's patch, brought back to HEAD, and using Control+Shift+Up/Down (2.99 KB, patch)
2006-08-28 02:38 UTC, Mariano Suárez-Alvarez
none Details | Review
half page scrolling (2.05 KB, patch)
2007-05-25 20:35 UTC, Laurence Darby
none Details | Review
half page mouse scroll too! (2.40 KB, patch)
2007-05-29 16:24 UTC, Laurence Darby
none Details | Review

Description pantz 2003-08-03 01:37:43 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
Comment 1 Mariano Suárez-Alvarez 2003-08-03 03:32:08 UTC
*** Bug 96753 has been marked as a duplicate of this bug. ***
Comment 2 Mariano Suárez-Alvarez 2003-10-06 23:37:16 UTC
*** Bug 123985 has been marked as a duplicate of this bug. ***
Comment 3 Mariano Suárez-Alvarez 2004-04-28 21:29:59 UTC
*** Bug 131090 has been marked as a duplicate of this bug. ***
Comment 4 Mauricio 2004-09-04 07:00:50 UTC
Created attachment 31251 [details] [review]
pacth of vte.c

Modification off vte.c to implement single line scrolling with the
Shift-Up/Down keys.
Comment 5 Mauricio 2004-09-04 07:03:16 UTC
pacth = patch
off = of 

;)
Comment 6 Mariano Suárez-Alvarez 2004-10-31 03:02:39 UTC
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?
Comment 7 Mariano Suárez-Alvarez 2004-11-07 02:10:07 UTC
*** Bug 147757 has been marked as a duplicate of this bug. ***
Comment 8 Mauricio 2004-12-10 19:36:25 UTC
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)
Comment 9 Emil Soleyman-Zomalan 2004-12-20 07:23:59 UTC
*** Bug 161755 has been marked as a duplicate of this bug. ***
Comment 10 Michele Baldessari 2005-06-22 15:23:00 UTC
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..
Comment 11 Michele Baldessari 2005-06-22 15:24:05 UTC
Created attachment 48162 [details] [review]
Mauricio's patch - Updated to today's CVS
Comment 12 Michele Baldessari 2005-07-08 21:03:45 UTC
*** Bug 309773 has been marked as a duplicate of this bug. ***
Comment 13 devsk 2006-03-18 18:43:50 UTC
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?
Comment 14 Behdad Esfahbod 2006-03-19 06:09:46 UTC
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.
Comment 15 devsk 2006-03-20 19:04:48 UTC
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?
Comment 16 Behdad Esfahbod 2006-03-20 19:16:22 UTC
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.
Comment 17 devsk 2006-03-20 19:22:34 UTC
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?
Comment 18 Behdad Esfahbod 2006-03-20 20:06:48 UTC
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.
Comment 19 devsk 2006-03-20 20:16:03 UTC
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).
Comment 20 Behdad Esfahbod 2006-03-20 20:20:14 UTC
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.
Comment 21 devsk 2006-03-20 20:31:41 UTC
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.
Comment 22 Behdad Esfahbod 2006-03-20 20:37:37 UTC
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.
Comment 23 devsk 2006-03-20 20:49:24 UTC
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.
Comment 24 Robert Walton 2006-03-23 17:45:11 UTC
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}.

Comment 25 Mariano Suárez-Alvarez 2006-08-28 02:38:47 UTC
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...)
Comment 26 Mariano Suárez-Alvarez 2006-08-28 02:39:59 UTC
BTW, the patch I just posted adds a few lines to .cvsignore, too.
Comment 27 Behdad Esfahbod 2006-08-28 16:44:48 UTC
Thanks Mariano!
Comment 28 Richard Ferguson 2007-03-20 12:39:29 UTC
Behdad,

Did Mariano's new patch ever get commited?
Comment 29 devsk 2007-03-20 15:56:23 UTC
removing myself. 3 years is a long time for applying a basic patch...;-)
Comment 30 Behdad Esfahbod 2007-05-10 04:00:30 UTC
*** Bug 437326 has been marked as a duplicate of this bug. ***
Comment 31 Laurence Darby 2007-05-25 20:35:29 UTC
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
Comment 32 Laurence Darby 2007-05-26 00:40:09 UTC
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.

Comment 33 Laurence Darby 2007-05-29 16:24:29 UTC
Created attachment 89013 [details] [review]
half page mouse scroll too!

Ok, I found where the mouse scrolling is, I'm happy now...
Comment 34 Behdad Esfahbod 2007-11-27 12:38:21 UTC
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.