summaryrefslogtreecommitdiff
path: root/contrib/less/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/less/command.c')
-rw-r--r--contrib/less/command.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/less/command.c b/contrib/less/command.c
index 95c529f758c86..d898ed12e82b6 100644
--- a/contrib/less/command.c
+++ b/contrib/less/command.c
@@ -50,6 +50,7 @@ extern char *editor;
extern char *editproto;
#endif
extern int screen_trashed; /* The screen has been overwritten */
+extern int shift_count;
static char ungot[UNGOT_SIZE];
static char *ungotp = NULL;
@@ -1502,7 +1503,8 @@ commands()
case A_LSHIFT:
if (number <= 0)
- number = 8;
+ number = (shift_count > 0) ?
+ shift_count : sc_width / 2;
if (number > hshift)
number = hshift;
hshift -= number;
@@ -1511,7 +1513,8 @@ commands()
case A_RSHIFT:
if (number <= 0)
- number = 8;
+ number = (shift_count > 0) ?
+ shift_count : sc_width / 2;
hshift += number;
screen_trashed = 1;
break;