aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h5
-rw-r--r--src/xdisp.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 85012130689..51dc354d37c 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2629,6 +2629,11 @@ struct it
2629 the current row. */ 2629 the current row. */
2630 bool_bf line_number_produced_p : 1; 2630 bool_bf line_number_produced_p : 1;
2631 2631
2632 /* If true, the :align-to argument should be counted relative to the
2633 beginning of the screen line, not the logical line. Used by
2634 'wrap-prefix'. */
2635 bool_bf align_visually_p : 1;
2636
2632 enum line_wrap_method line_wrap; 2637 enum line_wrap_method line_wrap;
2633 2638
2634 /* The ID of the default face to use. One of DEFAULT_FACE_ID, 2639 /* The ID of the default face to use. One of DEFAULT_FACE_ID,
diff --git a/src/xdisp.c b/src/xdisp.c
index 0148cd76ada..5987813cd28 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -24494,6 +24494,11 @@ handle_line_prefix (struct it *it)
24494 prefix = get_line_prefix_it_property (it, Qwrap_prefix); 24494 prefix = get_line_prefix_it_property (it, Qwrap_prefix);
24495 if (NILP (prefix)) 24495 if (NILP (prefix))
24496 prefix = Vwrap_prefix; 24496 prefix = Vwrap_prefix;
24497 /* Interpreting :align-to relative to the beginning of the logical
24498 line effectively renders this feature unusable, so we make an
24499 exception for this use of :align-to. */
24500 if (!NILP (prefix))
24501 it->align_visually_p = true;
24497 } 24502 }
24498 else 24503 else
24499 { 24504 {
@@ -31972,7 +31977,9 @@ produce_stretch_glyph (struct it *it)
31972 && calc_pixel_width_or_height (&tem, it, prop, font, true, 31977 && calc_pixel_width_or_height (&tem, it, prop, font, true,
31973 &align_to)) 31978 &align_to))
31974 { 31979 {
31975 int x = it->current_x + it->continuation_lines_width; 31980 int x = it->current_x + (it->align_visually_p
31981 ? 0
31982 : it->continuation_lines_width);
31976 int x0 = x; 31983 int x0 = x;
31977 /* Adjust for line numbers, if needed. */ 31984 /* Adjust for line numbers, if needed. */
31978 if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p) 31985 if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p)