aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2021-06-03 17:45:12 +0300
committerEli Zaretskii2021-06-03 17:45:12 +0300
commitc3b44858dc9d9eeda4863ed6ffafbeb446374465 (patch)
treedb1084b19f7addea8bae8caf55b519da0093d148 /src
parent528e15775e1fa52f591681340f9d7772aa38b97e (diff)
downloademacs-c3b44858dc9d9eeda4863ed6ffafbeb446374465.tar.gz
emacs-c3b44858dc9d9eeda4863ed6ffafbeb446374465.zip
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>.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 0e8672961ae..e761ef8b37c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22386,15 +22386,23 @@ extend_face_to_end_of_line (struct it *it)
22386 it->face_id = (it->glyph_row->ends_at_zv_p ? 22386 it->face_id = (it->glyph_row->ends_at_zv_p ?
22387 default_face->id : face->id); 22387 default_face->id : face->id);
22388 22388
22389 /* Display fill-column indicator if needed. */
22390 const int indicator_column = fill_column_indicator_column (it, 1);
22391
22392 /* Make sure our idea of current_x is in sync with the glyphs 22389 /* Make sure our idea of current_x is in sync with the glyphs
22393 actually in the glyph row. They might differ because 22390 actually in the glyph row. They might differ because
22394 append_space_for_newline can insert one glyph without 22391 append_space_for_newline can insert one glyph without
22395 updating current_x. */ 22392 updating current_x. */
22396 it->current_x = it->glyph_row->used[TEXT_AREA]; 22393 it->current_x = it->glyph_row->used[TEXT_AREA];
22397 22394
22395 /* The above assignment causes the code below to use a
22396 non-standard semantics of it->current_x: it is measured
22397 relative to the beginning of the text-area, thus disregarding
22398 the window's hscroll. That is why we need to correct the
22399 indicator column for the hscroll, otherwise the indicator
22400 will not move together with the text as result of horizontal
22401 scrolling. */
22402 const int indicator_column =
22403 fill_column_indicator_column (it, 1) - it->first_visible_x;
22404
22405 /* Display fill-column indicator if needed. */
22398 while (it->current_x <= it->last_visible_x) 22406 while (it->current_x <= it->last_visible_x)
22399 { 22407 {
22400 if (it->current_x != indicator_column) 22408 if (it->current_x != indicator_column)