summaryrefslogtreecommitdiff
path: root/lisp/term
diff options
context:
space:
mode:
authorMasahiro Nakamura <tsuucat@icloud.com>2019-12-19 00:32:54 +0900
committerAlan Third <alan@idiocy.org>2019-12-22 11:47:29 +0000
commitba042176d8931cdf9441b3b4919ec74b75019494 (patch)
tree2a4cb526d7b457562dad46cef528a104f8a58324 /lisp/term
parentbfc54230c56dc85cd8a8073962cf6ed00758e1a6 (diff)
downloademacs-ba042176d8931cdf9441b3b4919ec74b75019494.tar.gz
emacs-ba042176d8931cdf9441b3b4919ec74b75019494.tar.bz2
emacs-ba042176d8931cdf9441b3b4919ec74b75019494.zip
Fix display of working text on NS (Bug#23412, Bug#1453)
* lisp/term/ns-win.el (ns-insert-working-text): (ns-delete-working-text): Change how working text is deleted to handle changed order of operations. * src/nsterm.m ([EmacsView insertText:]): Move deletion of working text until after insertion of new text. Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/ns-win.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 1841e679ac8..81e9a0cc9a8 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -316,10 +316,9 @@ The overlay is assigned the face `ns-working-text-face'."
(interactive)
(ns-delete-working-text)
(let ((start (point)))
- (insert ns-working-text)
- (overlay-put (setq ns-working-overlay (make-overlay start (point)
- (current-buffer) nil t))
- 'face 'ns-working-text-face)))
+ (overlay-put (setq ns-working-overlay (make-overlay start (point)))
+ 'after-string
+ (propertize ns-working-text 'face 'ns-working-text-face))))
(defun ns-echo-working-text ()
"Echo contents of `ns-working-text' in message display area.
@@ -342,8 +341,7 @@ See `ns-insert-working-text'."
;; Still alive?
(overlay-buffer ns-working-overlay))
(with-current-buffer (overlay-buffer ns-working-overlay)
- (delete-region (overlay-start ns-working-overlay)
- (overlay-end ns-working-overlay))
+ (overlay-put ns-working-overlay 'after-string nil)
(delete-overlay ns-working-overlay)))
((integerp ns-working-overlay)
(let ((msg (current-message))