Commit ba042176 authored by Masahiro Nakamura's avatar Masahiro Nakamura Committed by Alan Third

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
parent bfc54230
Pipeline #4349 failed with stage
in 79 minutes and 57 seconds
......@@ -316,10 +316,9 @@ The overlay is assigned the face `ns-working-text-face'."
(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)))
(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))
......@@ -6460,10 +6460,6 @@ - (void)insertText: (id)aString
if (!emacs_event)
/* First, clear any working text. */
if (workingText != nil)
[self deleteWorkingText];
/* It might be preferable to use getCharacters:range: below,
However, we probably can't use SAFE_NALLOCA here because it might
......@@ -6492,6 +6488,10 @@ - (void)insertText: (id)aString
emacs_event->code = code;
EV_TRAILER ((id)nil);
/* Last, clear any working text. */
if (workingText != nil)
[self deleteWorkingText];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment