emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 89d0c44: Revert "Fix display of working text on NS (Bug#23412,


From: Alan Third
Subject: emacs-27 89d0c44: Revert "Fix display of working text on NS (Bug#23412, Bug#1453)"
Date: Tue, 11 Feb 2020 12:35:38 -0500 (EST)

branch: emacs-27
commit 89d0c4451f4807a5f0e1adf9a9df395f84407066
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>

    Revert "Fix display of working text on NS (Bug#23412, Bug#1453)"
    
    This reverts commit ba042176d8931cdf9441b3b4919ec74b75019494.
    
    Do not merge to master (bug#38851)
---
 lisp/term/ns-win.el | 10 ++++++----
 src/nsterm.m        |  8 ++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 6acf6cd..90024b0 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -314,9 +314,10 @@ The overlay is assigned the face `ns-working-text-face'."
   (interactive)
   (ns-delete-working-text)
   (let ((start (point)))
-    (overlay-put (setq ns-working-overlay (make-overlay start (point)))
-                 'after-string
-                 (propertize ns-working-text 'face 'ns-working-text-face))))
+    (insert ns-working-text)
+    (overlay-put (setq ns-working-overlay (make-overlay start (point)
+                                                       (current-buffer) nil t))
+                'face 'ns-working-text-face)))
 
 (defun ns-echo-working-text ()
   "Echo contents of `ns-working-text' in message display area.
@@ -339,7 +340,8 @@ See `ns-insert-working-text'."
          ;; Still alive?
          (overlay-buffer ns-working-overlay))
     (with-current-buffer (overlay-buffer ns-working-overlay)
-      (overlay-put ns-working-overlay 'after-string nil)
+      (delete-region (overlay-start ns-working-overlay)
+                     (overlay-end ns-working-overlay))
       (delete-overlay ns-working-overlay)))
    ((integerp ns-working-overlay)
     (let ((msg (current-message))
diff --git a/src/nsterm.m b/src/nsterm.m
index c1d1d41..ed2d82c 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6456,6 +6456,10 @@ not_in_argv (NSString *arg)
   if (!emacs_event)
     return;
 
+  /* First, clear any working text.  */
+  if (workingText != nil)
+    [self deleteWorkingText];
+
   /* It might be preferable to use getCharacters:range: below,
      cf. 
https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/StringDrawing.html#//apple_ref/doc/uid/TP40001445-112378.
      However, we probably can't use SAFE_NALLOCA here because it might
@@ -6484,10 +6488,6 @@ not_in_argv (NSString *arg)
       emacs_event->code = code;
       EV_TRAILER ((id)nil);
     }
-
-  /* Last, clear any working text.  */
-  if (workingText != nil)
-    [self deleteWorkingText];
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]