# HG changeset patch # User Chong Yidong # Date 1214330330 0 # Node ID 9687aec12c3f430d509ee466cd786ed5699e3c7d # Parent 8a7483c32b73612a2b44508b40bda3f2f4ff49fb (compute_motion): Obey integer values of truncate-partial-width-windows. diff -r 8a7483c32b73 -r 9687aec12c3f src/indent.c --- a/src/indent.c Tue Jun 24 17:57:21 2008 +0000 +++ b/src/indent.c Tue Jun 24 17:58:50 2008 +0000 @@ -1349,10 +1349,20 @@ if (hpos > width) { - if (hscroll - || (truncate_partial_width_windows - && ((width + continuation_glyph_width) - < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))) + int total_width = width + continuation_glyph_width; + int truncate = 0; + + if (!NILP (Vtruncate_partial_width_windows) + && (total_width < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))) + { + if (INTEGERP (Vtruncate_partial_width_windows)) + truncate + = total_width < XFASTINT (Vtruncate_partial_width_windows); + else + truncate = 1; + } + + if (hscroll || truncate || !NILP (current_buffer->truncate_lines)) { /* Truncating: skip to newline, unless we are already past