unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: tsuucat via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: 23412@debbugs.gnu.org
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 00:55:25 +0900	[thread overview]
Message-ID: <ED6C6995-3232-45EA-AB07-39A04AACF6AC@icloud.com> (raw)
In-Reply-To: <20191217202837.GA18094@breton.holly.idiocy.org>

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]


> I had a quick look to see if I could see any way to sort it in the NS
> specific code but couldn’t see anything and haven’t really had a
> chance to dig more deeply.

Thanks.

I made another patch. Unlike <https://eow.alc.co.jp/search?q=unlike&ref=awlj> before this is NS specific version.

--
tsuucat

[-- Attachment #2.1: Type: text/html, Size: 1327 bytes --]

[-- Attachment #2.2: 0001-delete-workingText-last-in-insertText.patch --]
[-- Type: application/octet-stream, Size: 1740 bytes --]

From b163b00624ef3fa5cc3a31d62cdb12714cd6831f Mon Sep 17 00:00:00 2001
From: Masahiro Nakamura <tsuucat@icloud.com>
Date: Thu, 19 Dec 2019 00:32:54 +0900
Subject: [PATCH] delete workingText last in insertText

---
 lisp/term/ns-win.el | 3 +--
 src/nsterm.m        | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 1841e67..1cbe566 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -317,8 +317,7 @@ ns-insert-working-text
   (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))
+    (overlay-put (setq ns-working-overlay (make-overlay start (point)))
 		 'face 'ns-working-text-face)))
 
 (defun ns-echo-working-text ()
diff --git a/src/nsterm.m b/src/nsterm.m
index 52a9830..c5cc182 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6430,10 +6430,6 @@ - (void)insertText: (id)aString
   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
@@ -6462,6 +6458,10 @@ - (void)insertText: (id)aString
       emacs_event->code = code;
       EV_TRAILER ((id)nil);
     }
+
+  /* Last, clear any working text.  */
+  if (workingText != nil)
+    [self deleteWorkingText];
 }
 
 
-- 
2.21.0


[-- Attachment #2.3: Type: text/html, Size: 246 bytes --]

  reply	other threads:[~2019-12-18 15:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bebc4ca8-0a58-4ea0-8fb1-4dbb6d18e335@Spark>
2016-05-01  8:54 ` bug#23412: 25.1.50; GUI Emacs on Mac OS X: text is keeping shaking/re-displaying when insert text with external input method Chunyang Xu
2016-05-01 15:07   ` Eli Zaretskii
2016-05-01 15:35     ` Chunyang Xu
2016-05-27 19:16   ` Alan Third
2016-05-27 20:13     ` Chunyang Xu
2017-04-26 17:43   ` hylom
2017-05-01 12:26   ` bug#23412: Can this bug be fixed now? 张海君
2019-10-27 11:49   ` bug#23412: 25.1.50; GUI Emacs on Mac OS X: text is keeping shaking/re-displaying when insert text with external input method HaiJun Zhang
2019-10-28 11:26     ` Alan Third
2019-10-29 13:24       ` HaiJun Zhang
2019-10-29 19:20         ` Alan Third
2019-10-30  1:15           ` HaiJun Zhang
2019-10-31 20:53             ` Alan Third
2019-12-05 11:21               ` Stefan Kangas
2019-12-05 14:43                 ` Alan Third
2019-12-04 11:19   ` bug#23412: tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-04 22:50     ` bug#23412: HaiJun Zhang
2019-12-17  9:18   ` bug#23412: 25.1.50; GUI Emacs on Mac OS X: text is keeping shaking/re-displaying when insert text with external input method tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-17 20:28     ` Alan Third
2019-12-18 15:55       ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2019-12-18 20:44         ` Alan Third
2019-12-19  0:31           ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-19  2:05             ` HaiJun Zhang
2019-12-19  5:57               ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-19  6:14                 ` HaiJun Zhang
2019-12-19  6:22                   ` HaiJun Zhang
2019-12-19  7:02                 ` HaiJun Zhang
2019-12-21 22:54                 ` Alan Third
2019-12-22  3:33                   ` Eli Zaretskii
2019-12-22  7:24                   ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-22 11:51                     ` Alan Third
2019-12-22 17:14                       ` Eli Zaretskii
2019-12-22 11:32                   ` HaiJun Zhang
2019-12-22 12:02                     ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED6C6995-3232-45EA-AB07-39A04AACF6AC@icloud.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=23412@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=tsuucat@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).