Bug 280637 - [RFE] allow users to control how much shift+PageUp scrolls: half page or full page?
Summary: [RFE] allow users to control how much shift+PageUp scrolls: half page or full...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.6.4
Platform: Slackware Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-23 11:10 UTC by Klick Back
Modified: 2013-06-13 23:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klick Back 2011-08-23 11:10:22 UTC
Version:           2.6.4 (using KDE 4.6.5) 
OS:                Linux

When doing Shift + PageUp in konsole, the text buffer scrolls back only half a page. For example, if I have 20 rows of text in my konsole window, doing a pageup only scrolls up by 10 rows.

This makes reading logs with a large number of lines very difficult and inconvenient and is also inconsistent with other KDE applications (eg. okular, konqueror).

Reproducible: Always

Steps to Reproduce:
Do a Shift + PageUp in a Konsole window.

Actual Results:  
The buffer scrolls up by only half a page.

Expected Results:  
The text buffer should scroll up by one full page
Comment 1 Jekyll Wu 2011-08-23 14:41:53 UTC
Yeah, I do observe the same behaviour. However,  that is exactly how KDE3 konsole scrolls (or even older versions which I have no experience with). And that is how xterm and linux console scroll when Shift+PgUp/PgDn is pressed(correct me).gnome-terminal does scroll full page.

Another interesting fact: I searched the bugzilla history to see whether this has ever been reported before. To my surprise, I failed to find any(correct me). That interesting fact may be explained in many ways. I can think of two :

1). Most users simply do not notice or care much about whether it scrolls half or full page.
2). Most users like this 'scroll-by-half-page-so-you-have-context' behavior, so they do not report.

If reason #1 is the truth, then changing current behavior is not a big deal. But if reason #2 is the truth, changing it might make many users unhappy and open new reports to revert the change.

So here is the typical question: Is it a feature, or bug ?
Comment 2 Klick Back 2011-08-24 06:02:52 UTC
(In reply to comment #1)
> Yeah, I do observe the same behaviour. However,  that is exactly how KDE3
> konsole scrolls (or even older versions which I have no experience with). And
> that is how xterm and linux console scroll when Shift+PgUp/PgDn is
> pressed(correct me).gnome-terminal does scroll full page.

That is indeed correct. xterm and Linux console also behave like konsole, while gnome-terminal, rxvt, lxterminal, xfce terminal and FreeBSD console do a full scroll. So I see no 'standard' way of doing this.


> If reason #1 is the truth, then changing current behavior is not a big deal.
> But if reason #2 is the truth, changing it might make many users unhappy and
> open new reports to revert the change.
> 
> So here is the typical question: Is it a feature, or bug ?

I talked to some people on #kde on freenode about this. They confirm the behaviour.
One person said he was also irritated while another actually _liked_ the half-scroll behaviour because it provides context, others didn't seem to care either way. 

About the 'context' problem with full scroll, one option is that for 'n' number of rows in your window, doing a PgUp scrolls up by (n - 1) number of rows. This is how most web browsers behave.


So I am not sure if changing the default to full scroll is an option since there are people who prefer this behaviour.
On the other hand, a full scroll is also how other KDE applications behave - most web browsers do the same.


IMO the best approach right now seems to be to keep the half scroll as default, while add an option for full scroll in the preferences.
Comment 3 Jekyll Wu 2012-02-26 12:04:31 UTC
Before this issue is finally solved or rejected, you can make local change to the code of konsole to get preferred behavior:

// konsole/src/ScreenWindow.cpp
void ScreenWindow::scrollBy(RelativeScrollMode mode , int amount)
{
    if (mode == ScrollLines) {
        scrollTo(currentLine() + amount);
    } else if (mode == ScrollPages) {
        //scrollTo(currentLine() + amount * (windowLines() / 2));
        scrollTo(currentLine() + amount * (windowLines()));
    }
}
Comment 4 sparhawk 2013-01-11 02:14:59 UTC
I'd like to see this implemented too, and I have another argument to make it a full page by default. This would maintain consistency within konsole itself, since most (all?) paging utilities also scroll by a full page. e.g. less, more, vim, nano. I can't actually think of any which scroll by half a page.
Comment 5 Christoph Feck 2013-01-20 01:35:46 UTC
I am using "amount * (windowLines() - 1)" since a few months, and cannot imagine switching back to half page scrolling.
Comment 6 Kurt Hindenburg 2013-02-24 17:06:28 UTC
Git commit 3cd4d2e44031cfbbb84e6cda2fbdebf5c02042d6 by Kurt Hindenburg.
Committed on 24/02/2013 at 18:03.
Pushed by hindenburg into branch 'master'.

Add profile option to scroll full/half height via Page Up/Down keys

The default is still half page - there is no GUI to change this;
either use konsoleprofile or change the .profile manually.

M  +2    -0    src/Profile.cpp
M  +4    -0    src/Profile.h
M  +5    -2    src/ScreenWindow.cpp
M  +2    -1    src/ScreenWindow.h
M  +12   -1    src/TerminalDisplay.cpp
M  +4    -0    src/TerminalDisplay.h
M  +3    -0    src/ViewManager.cpp

http://commits.kde.org/konsole/3cd4d2e44031cfbbb84e6cda2fbdebf5c02042d6
Comment 7 Klick Back 2013-02-26 08:19:11 UTC
Thanks for adding the feature, Kurt. I really appreciate it :)


Cheers!
Comment 8 Kurt Hindenburg 2013-05-18 15:04:04 UTC
Git commit 18d52314432eba37334b68be18173b2f14fe0ba7 by Kurt Hindenburg.
Committed on 18/05/2013 at 17:02.
Pushed by hindenburg into branch 'master'.

Add GUI to alter profile setting handling Page Up/Down

This adds the GUI to setup the page up/down scrolling to either full
or half height.

The non-GUI code was in 3cd4d2e44031cfbbb84e6cda2fbdebf5c02042d6
GUI:

M  +19   -0    src/EditProfileDialog.cpp
M  +3    -0    src/EditProfileDialog.h
M  +37   -5    src/EditProfileDialog.ui
M  +10   -0    src/Enumeration.h

http://commits.kde.org/konsole/18d52314432eba37334b68be18173b2f14fe0ba7