Fix fill-column-indicator on TTY frames
* src/xdisp.c (extend_face_to_end_of_line): Fix calculation of fill-column-indicator on TTY frames. Suggested by Jimmy Aguilar Mena <spacibba@aol.com>.
This commit is contained in:
parent
528e15775e
commit
c3b44858dc
1 changed files with 11 additions and 3 deletions
14
src/xdisp.c
14
src/xdisp.c
|
@ -22386,15 +22386,23 @@ extend_face_to_end_of_line (struct it *it)
|
|||
it->face_id = (it->glyph_row->ends_at_zv_p ?
|
||||
default_face->id : face->id);
|
||||
|
||||
/* Display fill-column indicator if needed. */
|
||||
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];
|
||||
|
||||
/* The above assignment causes the code below to use a
|
||||
non-standard semantics of it->current_x: it is measured
|
||||
relative to the beginning of the text-area, thus disregarding
|
||||
the window's hscroll. That is why we need to correct the
|
||||
indicator column for the hscroll, otherwise the indicator
|
||||
will not move together with the text as result of horizontal
|
||||
scrolling. */
|
||||
const int indicator_column =
|
||||
fill_column_indicator_column (it, 1) - it->first_visible_x;
|
||||
|
||||
/* Display fill-column indicator if needed. */
|
||||
while (it->current_x <= it->last_visible_x)
|
||||
{
|
||||
if (it->current_x != indicator_column)
|
||||
|
|
Loading…
Add table
Reference in a new issue