;; Lines are not truncated...
(not
(and
- (or truncate-lines
- (and (integerp truncate-partial-width-windows)
- (< (window-total-width)
- truncate-partial-width-windows))
- (and truncate-partial-width-windows
- (not (integerp truncate-partial-width-windows))
- (not (window-full-width-p))))
+ (or truncate-lines (truncated-partial-width-window-p))
;; ...or if lines are truncated, this buffer
;; doesn't have very long lines.
(long-line-optimizations-p)))
;; Lines aren't truncated.
(not
(and
- (or truncate-lines
- (and (integerp truncate-partial-width-windows)
- (< (window-total-width)
- truncate-partial-width-windows))
- (and truncate-partial-width-windows
- (not (integerp truncate-partial-width-windows))
- (not (window-full-width-p))))
+ (or truncate-lines (truncated-partial-width-window-p))
(long-line-optimizations-p)))
;; When the text in the window is scrolled to the left,
;; display-based motion doesn't make sense (because each
;; Move to the desired column.
(if (and line-move-visual
- (not (or truncate-lines truncate-partial-width-windows)))
+ (not (or truncate-lines (truncated-partial-width-window-p))))
;; Under line-move-visual, goal-column should be
;; interpreted in units of the frame's canonical character
;; width, which is exactly what vertical-motion does.
;; vertical-motion returns a number that is 1 larger than it
;; should. We need to fix that.
(setq end-invisible-p
- (and (or truncate-lines
- (and (natnump truncate-partial-width-windows)
- (< (window-total-width window)
- truncate-partial-width-windows)))
+ (and (or truncate-lines (truncated-partial-width-window-p window))
(save-excursion
(goto-char finish)
(> (- (current-column) (window-hscroll window))
(when goal-column
;; Move to the desired column.
(if (and line-move-visual
- (not (or truncate-lines truncate-partial-width-windows)))
+ (not (or truncate-lines (truncated-partial-width-window-p))))
;; Under line-move-visual, goal-column should be
;; interpreted in units of the frame's canonical character
;; width, which is exactly what vertical-motion does.
(let ((t-p-w-w (buffer-local-value 'truncate-partial-width-windows
(window-buffer window))))
(if (integerp t-p-w-w)
- (< (window-width window) t-p-w-w)
+ (< (window-total-width window) t-p-w-w)
t-p-w-w))))
\f
if (!NILP (BVAR (current_buffer, truncate_lines)))
lines_truncated = true;
- else if (w && FIXNUMP (Vtruncate_partial_width_windows))
- lines_truncated =
- w->total_cols < XFIXNAT (Vtruncate_partial_width_windows);
- else if (w && !NILP (Vtruncate_partial_width_windows))
- lines_truncated =
- w->total_cols < FRAME_COLS (XFRAME (WINDOW_FRAME (w)));
+ else if (!NILP (Vtruncate_partial_width_windows) && w
+ && w->total_cols < FRAME_COLS (XFRAME (WINDOW_FRAME (w))))
+ {
+ if (FIXNUMP (Vtruncate_partial_width_windows))
+ lines_truncated =
+ w->total_cols < XFIXNAT (Vtruncate_partial_width_windows);
+ else
+ lines_truncated = true;
+ }
/* Special optimization for buffers with long and truncated
lines: assumes that each character is a single column. */
if (lines_truncated)