=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.53 retrieving revision 1.54 diff -c -r1.53 -r1.54 *** src/usr.bin/tmux/screen-write.c 2012/03/03 09:43:22 1.53 --- src/usr.bin/tmux/screen-write.c 2012/03/14 23:29:07 1.54 *************** *** 1,4 **** ! /* $OpenBSD: screen-write.c,v 1.53 2012/03/03 09:43:22 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen-write.c,v 1.54 2012/03/14 23:29:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1071,1079 **** return; } - /* Initialise the redraw context, saving the last cell. */ - screen_write_initctx(ctx, &ttyctx, 1); - /* If in insert mode, make space for the cells. */ if (s->mode & MODE_INSERT && s->cx <= screen_size_x(s) - width) { xx = screen_size_x(s) - s->cx - width; --- 1071,1076 ---- *************** *** 1086,1091 **** --- 1083,1091 ---- screen_write_linefeed(ctx, 1); s->cx = 0; /* carriage return */ } + + /* Initialise the redraw context, saving the last cell. */ + screen_write_initctx(ctx, &ttyctx, 1); /* Sanity checks. */ if (((s->mode & MODE_WRAP) && s->cx > screen_size_x(s) - width)