bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23412: 25.1.50; GUI Emacs on Mac OS X: text is keeping shaking/re-di


From: HaiJun Zhang
Subject: bug#23412: 25.1.50; GUI Emacs on Mac OS X: text is keeping shaking/re-displaying when insert text with external input method
Date: Thu, 19 Dec 2019 10:05:59 +0800

Since the working text is not the final text to insert to buffer, how about displaying it using after-string property of overlay? Such as:

(overlay-put (setq ns-working-overlay (make-overlay start (point)))
   ‘after-string (propertize ns-working-text ‘face 'ns-working-text-face))

在 2019年12月19日 +0800 AM8:32,tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs@gnu.org>,写道:

Can I ask what this change does?

- (overlay-put (setq ns-working-overlay (make-overlay start (point)
- (current-buffer) nil t))
+ (overlay-put (setq ns-working-overlay (make-overlay start (point)))


At first I thought it would be fixed just by moving [self deleteWorkingText] in nsterm.m.
However as a result insertText (ex: pressing RET to input selected candidates) left nothing.

That’s because ns-delete-working-text (by [self deleteWorkingText]) delete all inserted
chars including chars inserted by insertText-emited normal input events. This patch prevent
ns-working-overlay expanding its size in insertText.


Unfortunately I found the patch change behavior of undo worse. So NS-spesific patch should
have further modification.

--
tsuucat





reply via email to

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