=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- src/usr.bin/tmux/screen-write.c 2013/03/22 10:41:01 1.65 +++ src/usr.bin/tmux/screen-write.c 2013/03/27 11:19:19 1.66 @@ -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 @@ -488,6 +488,8 @@ 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 @@ if (ny > s->rlower - s->cy) ny = s->rlower - s->cy; } + if (s->cx == screen_size_x(s)) + s->cx--; if (ny == 0) return;