From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs 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: Mon, 28 Oct 2019 11:26:45 +0000 Message-ID: <20191028112645.GA18613@breton.holly.idiocy.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="188466"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.12.0 (2019-05-25) Cc: "23412@debbugs.gnu.org" <23412@debbugs.gnu.org> To: HaiJun Zhang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 28 12:27:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iP3B4-000mvn-Ux for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Oct 2019 12:27:15 +0100 Original-Received: from localhost ([::1]:52674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP3B3-0007hy-HQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Oct 2019 07:27:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45763) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP3Au-0007dr-2d for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2019 07:27:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iP3As-0007Zj-Ta for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2019 07:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35127) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iP3As-0007Zd-OQ for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2019 07:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iP3As-0004bI-JY for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2019 07:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2019 11:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23412 X-GNU-PR-Package: emacs Original-Received: via spool by 23412-submit@debbugs.gnu.org id=B23412.157226201717671 (code B ref 23412); Mon, 28 Oct 2019 11:27:02 +0000 Original-Received: (at 23412) by debbugs.gnu.org; 28 Oct 2019 11:26:57 +0000 Original-Received: from localhost ([127.0.0.1]:43948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP3Am-0004ax-Tq for submit@debbugs.gnu.org; Mon, 28 Oct 2019 07:26:57 -0400 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:56062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP3Al-0004ak-AA for 23412@debbugs.gnu.org; Mon, 28 Oct 2019 07:26:55 -0400 Original-Received: by mail-wm1-f51.google.com with SMTP id g24so9021909wmh.5 for <23412@debbugs.gnu.org>; Mon, 28 Oct 2019 04:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Rh2eU4/XzbQRmgIDzwlamj7bPbQvg6n4CF3nygae1i8=; b=IwMVJLJ1bEFVjLgrTUHdBeDm6w6veMVyWfWOtAR7fqFI5LUZs4GuP20ZdStFJBpIgh UyA91EFHyYiFGAUTyKVjqM7nvalXpVKYlBHkEF7tI+zxxLoDOwJwfTx74hRlpEBTSvvF EG0JF34mrVFonGFbZq6xY19/F0X9jgAVGz98o7c1J5xSFhncslQftJ2D9LJiM6OAkh0p dL/SXUmdrcbcbDibDAzmynrfPemZwXqe+Raltx83i2uAkURSJTHLXWLq4ECoCEd9plcK NSQOQRtzf72Ih90NcPb73T8+ds1Qt/yIlp193gAd9+sj6nAenvEVgR59sKzZECR00gIP LsIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Rh2eU4/XzbQRmgIDzwlamj7bPbQvg6n4CF3nygae1i8=; b=F4XKaCUl1iWeL8Yw4qN8wz6rK7ZIO0qOY7wSUqYcliaRXuyQYB73imrQWuxrch4DjF eI1iyL/zoFgEDCI7/EmeF5nr3JoLHPd32p2YtkGbWepHkfRXG7VH1KalmYUwKyNOy8Vz N5UPseNwCsBGjBE9a177RLalFWMVsJEBJ13uENl+yDRP8vDAlZglb1JuLrZ933czeiVK n+2Q1EdzRruVkV1rJK3aBZKYPZLy5nBbW3biavi0ILSNIBWb4urw5LxlpZMbkgnFsqzU lP/yRcvi+d6uYQ2xcHXyZK3OGsAvuXwcLsW4Q14NPI6M5nVpqsGdg0LgQRIx0j3dfCVL ICHQ== X-Gm-Message-State: APjAAAXNy+OgkxfL3xmKWwGWgYP7zUHba0wOPgXloQSqCmHkpRjcL93A BkFms5aiJTSNLECrqBQ0yP4= X-Google-Smtp-Source: APXvYqx+utN4vYfSIoUPa7WlqKD5OeBlngVbNpNXIpPdE0g07SlCmUzWslXb7lDr0vMXKD1bSy/Cbg== X-Received: by 2002:a1c:1d41:: with SMTP id d62mr15008332wmd.32.1572262009176; Mon, 28 Oct 2019 04:26:49 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-05f7-c8dd-14f5-1780.holly.idiocy.org. [2001:8b0:3f8:8129:5f7:c8dd:14f5:1780]) by smtp.gmail.com with ESMTPSA id o22sm1880537wmc.41.2019.10.28.04.26.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2019 04:26:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170293 Archived-At: --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 27, 2019 at 11:49:20AM +0000, HaiJun Zhang wrote: > After some debugging work, I think I find the cause. > > See the discussion: https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg01096.html Thanks for working this out. I suspect that we can remove a call to delete the working text from the C code and just leave it to lisp. Please try the attached patch. -- Alan Third --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Prevent-flicker-with-macOS-input-methods-bug-23412.patch" >From 201a496eb011ccc3a630fe9fa8d69da58a13b469 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Mon, 28 Oct 2019 11:21:29 +0000 Subject: [PATCH] Prevent flicker with macOS input methods (bug#23412) * src/nsterm.m ([EmacsView setMarkedText:selectedRange:]): Don't delete the working text as ns-put-working-text does that anyway. --- src/nsterm.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 5583c6105c..2622242071 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6435,8 +6435,6 @@ - (void)setMarkedText: (id)aString selectedRange: (NSRange)selRange (unsigned long)selRange.length, (unsigned long)selRange.location); - if (workingText != nil) - [self deleteWorkingText]; if ([str length] == 0) return; -- 2.21.0 --DocE+STaALJfprDB--