]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent text flicker with macOS input methods (bug#23412)
authorAlan Third <alan@idiocy.org>
Mon, 28 Oct 2019 11:21:29 +0000 (11:21 +0000)
committerAlan Third <alan@idiocy.org>
Thu, 31 Oct 2019 20:40:56 +0000 (20:40 +0000)
* src/nsterm.m ([EmacsView setMarkedText:selectedRange:]): Don't
always delete the working text as ns-put-working-text does that.

src/nsterm.m

index 5583c6105cbf52d9564974e4fd2d646a9fed33b8..afe7069aaed9d12eaef44c02d4eed6d4cab80c21 100644 (file)
@@ -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]);