From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56815: 29.0.50; Isearch lazy-highlight highlights too much when truncate-lines is in effect Date: Sun, 21 Aug 2022 20:06:12 +0300 Message-ID: <83k071bk6z.fsf@gnu.org> References: <83mtct87ti.fsf@gnu.org> <865yjhc85k.fsf@mail.linkov.net> <83fsik8o39.fsf@gnu.org> <87r124kul6.fsf@gnus.org> <86mtcrpyzs.fsf@mail.linkov.net> <83bkt77nf9.fsf@gnu.org> <83a68r7m2d.fsf@gnu.org> <837d3v7kr9.fsf@gnu.org> <86fsih5bch.fsf@mail.linkov.net> <83wnbs2nc3.fsf@gnu.org> <86y1w7bzum.fsf@mail.linkov.net> <83r11jj5ht.fsf@gnu.org> <86v8qlljwp.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1969"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56815@debbugs.gnu.org, gregory@heytings.org, larsi@gnus.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 21 19:07:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPoPu-0000Lr-Bb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 19:07:18 +0200 Original-Received: from localhost ([::1]:33022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPoPt-0004tj-5r for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 13:07:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPoPm-0004sC-CZ for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 13:07:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPoPe-0007Xc-2Y for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 13:07:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPoPd-0006ls-KJ for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 13:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Aug 2022 17:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56815 X-GNU-PR-Package: emacs Original-Received: via spool by 56815-submit@debbugs.gnu.org id=B56815.166110158225977 (code B ref 56815); Sun, 21 Aug 2022 17:07:01 +0000 Original-Received: (at 56815) by debbugs.gnu.org; 21 Aug 2022 17:06:22 +0000 Original-Received: from localhost ([127.0.0.1]:36663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPoP0-0006kt-6u for submit@debbugs.gnu.org; Sun, 21 Aug 2022 13:06:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPoOv-0006kd-E9 for 56815@debbugs.gnu.org; Sun, 21 Aug 2022 13:06:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPoOp-0007Ur-LM; Sun, 21 Aug 2022 13:06:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FXS+lfntWdpz24y+Rg+m/3z3By7vuKkLa31XHRzPLm4=; b=UHzxceXDSZKQ Ztr4no/Q9wKJrdM4qHgqBIbSnOrXBSUx2f9tefDgJrUAHyIxNwg2yqN5cEDFyAdVGgKqQjCV+5W6m WXNAlJNJyXSAuLDIOS15CcmIdQuqvwln6qis6NG1T+ZIb4TRaA7RdsepwpAevmJNwGaeB8NO7rnOo 5Hg8qL64E1Xvq2QaTkkkA/nKo3slhYz0HOFsuZJEz3D/aDnU2ZUKQ8/6Qsv1yF+XTK+4iSX1czktU zfpxfxqoaJR4aMUZYFus4q24Q0/K9ScCYrbPbpfRDGiIvKnoAlKB5UaHI1XZNUMfOgNRDdw62fa3y LdQUkBaMSkYvyyWbotMePA==; Original-Received: from [87.69.77.57] (port=2815 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPoOp-0004Ry-04; Sun, 21 Aug 2022 13:06:11 -0400 In-Reply-To: <86v8qlljwp.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 21 Aug 2022 19:32:14 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240342 Archived-At: > From: Juri Linkov > Cc: gregory@heytings.org, larsi@gnus.org, 56815@debbugs.gnu.org > Date: Sun, 21 Aug 2022 19:32:14 +0300 > > > You can now use the new long-line-optimizations-p predicate for that. > > Although from your description above, perhaps Isearch should behave > > like that in a buffer with line-truncation regardless of the long > > lines. > > This means using the same condition like in 'line-move'? > > (and > (or truncate-lines > (and (integerp truncate-partial-width-windows) > (< (window-total-width) > truncate-partial-width-windows)) > (and truncate-partial-width-windows > (not (integerp truncate-partial-width-windows)) > (not (window-full-width-p)))) > ;; ...or if lines are truncated, this buffer > ;; doesn't have very long lines. > (long-line-optimizations-p)) Yes, this is the (unfortunately complicated) way of determining whether the window has truncated lines. > I suggest to leave 'long-line-optimizations-p' at the end because It _is_ at the end, isn't it? > in such cases when 'lazy-highlight-cleanup' is customized to nil > the users might want to leave highlighting on truncated lines > after exiting Isearch to see matches when scrolling horizontally > (when lines are not long). Ideally, when the window is hscrolled, the matches that come into view should be lazily highlighted, and those which become invisible should be de-highlighted.