aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-06-24 17:58:50 +0000
committerChong Yidong2008-06-24 17:58:50 +0000
commit81b6a6652625aab2207d2a3468d2553ae37f0a71 (patch)
tree68e89a965fea96808ec33a318436b5117f51cf4f /src
parent64d3f03b8963d168920cde68cb22273d558bdfa3 (diff)
downloademacs-81b6a6652625aab2207d2a3468d2553ae37f0a71.tar.gz
emacs-81b6a6652625aab2207d2a3468d2553ae37f0a71.zip
(compute_motion): Obey integer values of truncate-partial-width-windows.
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