=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.41 retrieving revision 1.42 diff -c -r1.41 -r1.42 *** src/usr.bin/tmux/screen-write.c 2009/12/03 22:50:10 1.41 --- src/usr.bin/tmux/screen-write.c 2010/04/06 21:35:44 1.42 *************** *** 1,4 **** ! /* $OpenBSD: screen-write.c,v 1.41 2009/12/03 22:50:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen-write.c,v 1.42 2010/04/06 21:35:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1009,1021 **** } /* Check this will fit on the current line and wrap if not. */ ! if (s->cx > screen_size_x(s) - width) { screen_write_linefeed(ctx, 1); s->cx = 0; /* carriage return */ } /* Sanity checks. */ ! if (s->cx > screen_size_x(s) - 1 || s->cy > screen_size_y(s) - 1) return; /* Handle overwriting of UTF-8 characters. */ --- 1009,1022 ---- } /* Check this will fit on the current line and wrap if not. */ ! if ((s->mode & MODE_WRAP) && s->cx > screen_size_x(s) - width) { screen_write_linefeed(ctx, 1); s->cx = 0; /* carriage return */ } /* Sanity checks. */ ! if (((s->mode & MODE_WRAP) && s->cx > screen_size_x(s) - 1) ! || s->cy > screen_size_y(s) - 1) return; /* Handle overwriting of UTF-8 characters. */