# HG changeset patch # User Gerd Moellmann # Date 975327134 0 # Node ID 93b22ccc23e298b398f96e6c0b84d0b586208372 # Parent da7c75342507359e30ae711f00562f8c268af114 (try_window_id): Avoid starting to display in the moddle of a character, a TAB for instance. This is easier than to set up the iterator exactly, and it's not a frequent case, so the additional effort wouldn't really pay off. diff -r da7c75342507 -r 93b22ccc23e2 src/xdisp.c --- a/src/xdisp.c Mon Nov 27 12:11:33 2000 +0000 +++ b/src/xdisp.c Mon Nov 27 12:12:14 2000 +0000 @@ -10767,6 +10767,17 @@ last_unchanged_at_beg_row = find_last_unchanged_at_beg_row (w); if (last_unchanged_at_beg_row) { + /* Avoid starting to display in the moddle of a character, a TAB + for instance. This is easier than to set up the iterator + exactly, and it's not a frequent case, so the additional + effort wouldn't really pay off. */ + while (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row) + && last_unchanged_at_beg_row > w->current_matrix->rows) + --last_unchanged_at_beg_row; + + if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row)) + return 0; + init_to_row_end (&it, w, last_unchanged_at_beg_row); start_pos = it.current.pos;