diff options
author | 2013-03-27 11:19:19 +0000 | |
---|---|---|
committer | 2013-03-27 11:19:19 +0000 | |
commit | a8b553061093378ea8c0ae295556c5c153c94393 (patch) | |
tree | b177cfab9cebb9232dcce20427a3e982b1d84000 /usr.bin/tmux/screen-write.c | |
parent | Remove tmux's (already minimal) 88 colour support. Such terminals are (diff) | |
download | wireguard-openbsd-a8b553061093378ea8c0ae295556c5c153c94393.tar.xz wireguard-openbsd-a8b553061093378ea8c0ae295556c5c153c94393.zip |
Move the cursor back into the last column on CUU/CUD to match xterm
behaviour. From George Nachman.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 71737ff1183..08616ccc6c5 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.65 2013/03/22 10:41:01 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.66 2013/03/27 11:19:19 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -488,6 +488,8 @@ screen_write_cursorup(struct screen_write_ctx *ctx, u_int ny) if (ny > s->cy - s->rupper) ny = s->cy - s->rupper; } + if (s->cx == screen_size_x(s)) + s->cx--; if (ny == 0) return; @@ -512,6 +514,8 @@ screen_write_cursordown(struct screen_write_ctx *ctx, u_int ny) if (ny > s->rlower - s->cy) ny = s->rlower - s->cy; } + if (s->cx == screen_size_x(s)) + s->cx--; if (ny == 0) return; |