(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.
;; 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))
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
emacs_event->code = code;
EV_TRAILER ((id)nil);
}
-
- /* Last, clear any working text. */
- if (workingText != nil)
- [self deleteWorkingText];
}