diff options
-rw-r--r-- | src/dispnew.c | 10 | ||||
-rw-r--r-- | src/xdisp.c | 15 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index df55b32c718..7822829d648 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -2559,11 +2559,15 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w the corresponding frame row to be updated. */ frame_row->enabled_p = true; - /* Maybe insert a vertical border between horizontally adjacent + /* Maybe insert a vertical border between horizontally adjacent windows. */ - if (GLYPH_CHAR (right_border_glyph) != 0) + if (GLYPH_CHAR (right_border_glyph) != 0) { - struct glyph *border = window_row->glyphs[LAST_AREA] - 1; + struct glyph *border = window_row->glyphs[LAST_AREA] - 1; + /* It's a subtle bug if we are overwriting some non-char + glyph with the vertical border glyph. */ + eassert (border->type == CHAR_GLYPH); + border->type = CHAR_GLYPH; SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph); } diff --git a/src/xdisp.c b/src/xdisp.c index 71a5f1c34f0..681df093418 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22074,13 +22074,14 @@ extend_face_to_end_of_line (struct it *it) default_face->id : face->id); /* Display fill-column indicator if needed. */ - /* We need to subtract 1 to the indicator_column here because we - will add the indicator IN the column indicator number, not - after it. We compare the variable it->current_x before - producing the glyph. When FRAME_WINDOW_P we subtract - CHAR_WIDTH calculating STRETCH_WIDTH for the same reason. */ - const int indicator_column = - fill_column_indicator_column (it, 1) - 1; + const int indicator_column = fill_column_indicator_column (it, 1); + + /* Make sure our idea of current_x is in sync with the glyphs + actually in the glyph row. They might differ because + append_space_for_newline can insert one glyph without + updating current_x. */ + it->current_x = it->glyph_row->used[TEXT_AREA]; + do { if (it->current_x != indicator_column) |