aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-02-12 00:03:58 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-02-12 00:03:58 +0000
commit5a04f74d81f99d98c3c2adff0da6bdfe81843725 (patch)
tree2cdfc545a551510c9f71b694e8fa24c3b6eff159
parent959eeef5052c44bddee7bc46da55e4129345b1cb (diff)
downloadrtmux-5a04f74d81f99d98c3c2adff0da6bdfe81843725.tar.gz
rtmux-5a04f74d81f99d98c3c2adff0da6bdfe81843725.tar.bz2
rtmux-5a04f74d81f99d98c3c2adff0da6bdfe81843725.zip
Only use RI at the top of the screen.
-rw-r--r--CHANGES4
-rw-r--r--tty.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 263fd637..850a87c4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
11 February 2009
+* Only use ri when actually at the top of the screen; just move the cursor up
+ otherwise.
* FreeBSD's console wraps lines at $COLUMNS - 1 rather than $COLUMNS (the
cursor can never be beyond $COLUMNS - 1) and does not appear to support
changing this behaviour, or any of the obvious possibilities (turning off
@@ -1102,7 +1104,7 @@
(including mutt, emacs). No status bar yet and no key remapping or other
customisation.
-$Id: CHANGES,v 1.252 2009-02-11 23:16:41 nicm Exp $
+$Id: CHANGES,v 1.253 2009-02-12 00:03:58 nicm Exp $
LocalWords: showw utf UTF fulvio ciriaco joshe OSC APC gettime abc DEF OA clr
LocalWords: rivo nurges lscm Erdely eol smysession mysession ek dstname RB ms
diff --git a/tty.c b/tty.c
index c3dcf0f2..004219d5 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.71 2009-02-11 23:16:45 nicm Exp $ */
+/* $Id: tty.c,v 1.72 2009-02-12 00:03:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -587,16 +587,18 @@ tty_cmd_reverseindex(struct tty *tty, struct window_pane *wp, unused va_list ap)
if (s->old_cy == s->old_rupper) {
for (i = s->old_rupper; i <= s->old_rlower; i++)
tty_draw_line(tty, wp, i);
- return;
}
+ return;
}
tty_reset(tty);
tty_region(tty, s->old_rupper, s->old_rlower, wp->yoff);
- tty_cursor(tty, s->old_cx, s->old_cy, wp->yoff);
- tty_putcode(tty, TTYC_RI);
+ if (s->old_cy == s->old_rupper) {
+ tty_cursor(tty, s->old_cx, 0, wp->yoff);
+ tty_putcode(tty, TTYC_RI);
+ }
}
void