Mercurial > emacs
changeset 96237:9687aec12c3f
(compute_motion): Obey integer values of truncate-partial-width-windows.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 24 Jun 2008 17:58:50 +0000 |
parents | 8a7483c32b73 |
children | 1bb123f7f691 |
files | src/indent.c |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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