emacs-diffs
[Top][All Lists]
Advanced

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

master fd1b720: Prevent text flicker with macOS input methods (bug#23412


From: Alan Third
Subject: master fd1b720: Prevent text flicker with macOS input methods (bug#23412)
Date: Thu, 31 Oct 2019 16:52:07 -0400 (EDT)

branch: master
commit fd1b720028064c2566ff4dcc3ad898346a0f6b77
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>

    Prevent text flicker with macOS input methods (bug#23412)
    
    * src/nsterm.m ([EmacsView setMarkedText:selectedRange:]): Don't
    always delete the working text as ns-put-working-text does that.
---
 src/nsterm.m | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index 5583c61..afe7069 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6435,15 +6435,17 @@ not_in_argv (NSString *arg)
            (unsigned long)selRange.length,
            (unsigned long)selRange.location);
 
-  if (workingText != nil)
-    [self deleteWorkingText];
   if ([str length] == 0)
-    return;
+    {
+      [self deleteWorkingText];
+      return;
+    }
 
   if (!emacs_event)
     return;
 
   processingCompose = YES;
+  [workingText release];
   workingText = [str copy];
   ns_working_text = build_string ([workingText UTF8String]);
 



reply via email to

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