aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indent.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/indent.c b/src/indent.c
index fdc042bc9e4..71e993e31a2 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1349,10 +1349,20 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1349 1349
1350 if (hpos > width) 1350 if (hpos > width)
1351 { 1351 {
1352 if (hscroll 1352 int total_width = width + continuation_glyph_width;
1353 || (truncate_partial_width_windows 1353 int truncate = 0;
1354 && ((width + continuation_glyph_width) 1354
1355 < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))) 1355 if (!NILP (Vtruncate_partial_width_windows)
1356 && (total_width < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))))
1357 {
1358 if (INTEGERP (Vtruncate_partial_width_windows))
1359 truncate
1360 = total_width < XFASTINT (Vtruncate_partial_width_windows);
1361 else
1362 truncate = 1;
1363 }
1364
1365 if (hscroll || truncate
1356 || !NILP (current_buffer->truncate_lines)) 1366 || !NILP (current_buffer->truncate_lines))
1357 { 1367 {
1358 /* Truncating: skip to newline, unless we are already past 1368 /* Truncating: skip to newline, unless we are already past