aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2021-10-31 09:42:09 +0200
committerEli Zaretskii2021-10-31 09:42:09 +0200
commit335a660b4b725eb76abfa5d80295ac5c7be5d205 (patch)
tree6dc2cde76933a80120e2e77e7cae4955f0dc1dc0 /src
parent4a96f32def09e2d8a789d0b30ce0523c63203842 (diff)
downloademacs-335a660b4b725eb76abfa5d80295ac5c7be5d205.tar.gz
emacs-335a660b4b725eb76abfa5d80295ac5c7be5d205.zip
Fix display glitches with side-by-side windows on TTY frames
* src/dispnew.c (adjust_glyph_matrix, prepare_desired_row): Leave room for the border glyph only if the window does actually have the right margin. (Bug#51521)
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 69c2023fdf3..53eb8984747 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -475,7 +475,8 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
475 = row->glyphs[TEXT_AREA] + dim.width - left - right; 475 = row->glyphs[TEXT_AREA] + dim.width - left - right;
476 /* Leave room for a border glyph. */ 476 /* Leave room for a border glyph. */
477 if (!FRAME_WINDOW_P (XFRAME (w->frame)) 477 if (!FRAME_WINDOW_P (XFRAME (w->frame))
478 && !WINDOW_RIGHTMOST_P (w)) 478 && !WINDOW_RIGHTMOST_P (w)
479 && right > 0)
479 row->glyphs[RIGHT_MARGIN_AREA] -= 1; 480 row->glyphs[RIGHT_MARGIN_AREA] -= 1;
480 row->glyphs[LAST_AREA] 481 row->glyphs[LAST_AREA]
481 = row->glyphs[LEFT_MARGIN_AREA] + dim.width; 482 = row->glyphs[LEFT_MARGIN_AREA] + dim.width;
@@ -1148,7 +1149,8 @@ prepare_desired_row (struct window *w, struct glyph_row *row, bool mode_line_p)
1148 row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA] - right; 1149 row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA] - right;
1149 /* Leave room for a border glyph. */ 1150 /* Leave room for a border glyph. */
1150 if (!FRAME_WINDOW_P (XFRAME (w->frame)) 1151 if (!FRAME_WINDOW_P (XFRAME (w->frame))
1151 && !WINDOW_RIGHTMOST_P (w)) 1152 && !WINDOW_RIGHTMOST_P (w)
1153 && right > 0)
1152 row->glyphs[RIGHT_MARGIN_AREA] -= 1; 1154 row->glyphs[RIGHT_MARGIN_AREA] -= 1;
1153 } 1155 }
1154 } 1156 }