Date: Wed, 24 Dec 2008 14:00:57 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 155240 for review Message-ID: <200812241400.mBOE0vc5004539@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=155240 Change 155240 by ed@ed_dull on 2008/12/24 14:00:22 Tidy up this code a little. Affected files ... .. //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_subr.h#17 edit Differences ... ==== //depot/projects/mpsafetty/sys/dev/syscons/teken/teken_subr.h#17 (text+ko) ==== @@ -674,22 +674,18 @@ if (width <= 0) return; - if (t->t_stateflags & TS_INSERT) { - /* - * Insert mode. Move all existing characters to the - * right. - */ - if (t->t_cursor.tp_col < t->t_winsize.tp_col - width) { - teken_rect_t tr; - teken_pos_t tp; + if (t->t_stateflags & TS_INSERT && + t->t_cursor.tp_col < t->t_winsize.tp_col - width) { + teken_rect_t tr; + teken_pos_t tp; - tr.tr_begin = t->t_cursor; - tr.tr_end.tp_row = t->t_cursor.tp_row + 1; - tr.tr_end.tp_col = t->t_winsize.tp_col - width; - tp.tp_row = t->t_cursor.tp_row; - tp.tp_col = t->t_cursor.tp_col + width; - teken_funcs_copy(t, &tr, &tp); - } + /* Insert mode. Move existing characters to the right. */ + tr.tr_begin = t->t_cursor; + tr.tr_end.tp_row = t->t_cursor.tp_row + 1; + tr.tr_end.tp_col = t->t_winsize.tp_col - width; + tp.tp_row = t->t_cursor.tp_row; + tp.tp_col = t->t_cursor.tp_col + width; + teken_funcs_copy(t, &tr, &tp); } if (t->t_cursor.tp_col == t->t_winsize.tp_col - 1 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812241400.mBOE0vc5004539>