summaryrefslogtreecommitdiff
path: root/lisp/term.el
diff options
context:
space:
mode:
authorJohn Shahid <jvshahid@gmail.com>2019-04-28 15:59:50 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-05-06 14:35:40 -0400
commit66c388c21aa83d3ddb5a1827f81dd432514242ac (patch)
treea4a0895ffca496ffb19bc3df0ed3b6ceab0bdfb2 /lisp/term.el
parent77b1148b5164c71c4ba673173eed2a37918d4f78 (diff)
downloademacs-66c388c21aa83d3ddb5a1827f81dd432514242ac.tar.gz
Prevent accidental edits in the ansi-term buffer from breaking resizing
* lisp/term.el (term-unwrap-line, term-emulate-terminal): Prevent the `term-line-wrap` property of newlines from spreading accidentally when inserting text next to it.
Diffstat (limited to 'lisp/term.el')
-rw-r--r--lisp/term.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 586a887a29f..283e5684b72 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -2935,7 +2935,8 @@ See `term-prompt-regexp'."
(delete-region (point) (line-end-position))
(term-down 1 t)
(term-move-columns (- (term-current-column)))
- (put-text-property (1- (point)) (point) 'term-line-wrap t)
+ (add-text-properties (1- (point)) (point)
+ '(term-line-wrap t rear-nonsticky t))
(setq decoded-substring
(substring decoded-substring (- term-width old-column)))
(setq old-column 0)))
@@ -3754,7 +3755,8 @@ all pending output has been dealt with."))
(when (not (bolp))
(let ((old-point (point)))
(insert-before-markers ?\n)
- (put-text-property old-point (point) 'term-line-wrap t))))
+ (add-text-properties old-point (point)
+ '(term-line-wrap t rear-nonsticky t)))))
(defun term-erase-in-line (kind)
(when (= kind 1) ;; erase left of point