(term-set-escape-char (or term-escape-char ?\C-c))
-(defvar overflow-newline-into-fringe)
-
-(defun term-window-width ()
- (if (and (not (featurep 'xemacs))
- (display-graphic-p)
- overflow-newline-into-fringe
- ;; Subtract 1 from the width when any fringe has zero width,
- ;; not just the right fringe. Bug#18601.
- (/= (frame-parameter nil 'left-fringe) 0)
- (/= (frame-parameter nil 'right-fringe) 0))
- (window-body-width)
- (1- (window-body-width))))
-
\f
(put 'term-mode 'mode-class 'special)
(setq buffer-display-table term-display-table)
(set (make-local-variable 'term-home-marker) (copy-marker 0))
(set (make-local-variable 'term-height) (1- (window-height)))
- (set (make-local-variable 'term-width) (term-window-width))
+ (set (make-local-variable 'term-width) (window-max-chars-per-line))
(set (make-local-variable 'term-last-input-start) (make-marker))
(set (make-local-variable 'term-last-input-end) (make-marker))
(set (make-local-variable 'term-last-input-match) "")
a two-argument function used to combine the widths and heights of
the given windows."
(when windows
- (let ((width (window-body-width (car windows)))
+ (let ((width (window-max-chars-per-line (car windows)))
(height (window-body-height (car windows))))
(dolist (window (cdr windows))
- (setf width (funcall reducer width (window-body-width window)))
+ (setf width (funcall reducer width (window-max-chars-per-line window)))
(setf height (funcall reducer height (window-body-height window))))
(cons width height))))