PERFORCE change 155240 for review
Ed Schouten
ed at FreeBSD.org
Wed Dec 24 06:00:58 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=155240
Change 155240 by ed at 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 &&
More information about the p4-projects
mailing list