summaryrefslogtreecommitdiff
path: root/app/xterm/tabs.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-07 20:20:25 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-07 20:20:25 +0000
commit6a69937862dae0dcad84f30dbe32767c5a3eb149 (patch)
tree53557e77ac2b3ab2cc0dd8939331aa8b7b27017d /app/xterm/tabs.c
parenta64d53a3cd043209550978ba9e9b8d5c21725516 (diff)
Update to xterm 279. Tested by krw@, mpi@, shadchin@.
Diffstat (limited to 'app/xterm/tabs.c')
-rw-r--r--app/xterm/tabs.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/xterm/tabs.c b/app/xterm/tabs.c
index 4cce4ed06..a788da243 100644
--- a/app/xterm/tabs.c
+++ b/app/xterm/tabs.c
@@ -1,4 +1,4 @@
-/* $XTermId: tabs.c,v 1.39 2011/09/11 15:00:38 tom Exp $ */
+/* $XTermId: tabs.c,v 1.41 2012/05/02 14:14:36 tom Exp $ */
/*
* Copyright 2000-2010,2011 by Thomas E. Dickey
@@ -149,6 +149,8 @@ TabToNextStop(XtermWidget xw)
int next = TabNext(xw, xw->tabs, screen->cur_col);
int max = LineMaxCol(screen, getLineData(screen, screen->cur_row));
+ if (IsLeftRightMode(xw))
+ max = TScreenOf(xw)->rgt_marg;
if (next > max)
next = max;
set_cur_col(screen, next);
@@ -164,8 +166,15 @@ TabToPrevStop(XtermWidget xw)
{
TScreen *screen = TScreenOf(xw);
int saved_column = screen->cur_col;
+ int next_column = TabPrev(xw->tabs, screen->cur_col);
- set_cur_col(screen, TabPrev(xw->tabs, screen->cur_col));
+ if (xw->flags & ORIGIN) {
+ int left = ScrnLeftMargin(xw);
+ if (next_column < left)
+ next_column = left;
+ }
+
+ set_cur_col(screen, next_column);
return (screen->cur_col < saved_column);
}