summaryrefslogtreecommitdiff
path: root/lisp/term.el
diff options
context:
space:
mode:
authorAnders Lindgren <andlind@gmail.com>2016-04-26 20:58:52 +0200
committerAnders Lindgren <andlind@gmail.com>2016-04-26 20:58:52 +0200
commit5b5403289888efe8783ae6a405845b925f544ec1 (patch)
tree1fb6846e55de662653e8af049154a1af4c1a2953 /lisp/term.el
parent07d729130e5774fc484ba324d9149d4c6f008260 (diff)
downloademacs-5b5403289888efe8783ae6a405845b925f544ec1.tar.gz
Fix bug#22891: wrong terminal width when a fringe width is zero.
When either fringe width is zero, Emacs reserved one column for a continuation glyph. Terminal windows does not take this into account when the frame is resized. * lisp/window.el (window-adjust-process-window-size): Use `window-max-chars-per-line' instead of `window-body-width'. * lisp/term.el (term-window-width): Remove function. (It does the same as `window-max-chars-per-line' but without recent bug fixes.) (term-mode): Use `window-max-chars-per-line' instead of `term-window-width'.
Diffstat (limited to 'lisp/term.el')
-rw-r--r--lisp/term.el15
1 files changed, 1 insertions, 14 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 2d5d3e96000..28be8c8c530 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -919,19 +919,6 @@ is buffer-local."
(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))))
-
(put 'term-mode 'mode-class 'special)
@@ -1018,7 +1005,7 @@ Entry to this mode runs the hooks on `term-mode-hook'."
(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) "")