aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2024-08-10 14:36:22 -0300
committerDavid Bremner <david@tethera.net>2025-03-13 07:48:53 -0300
commit5cb06b1893091cb069da990556e822c21a684acf (patch)
tree4a804623a81c7d16fd0e83cde5963a380f351d89 /test
parenteb48d78758394c7241a1aa83a24cfd61e0a3c9fa (diff)
emacs: replace use of hook to draw hl-line in search mode
In the thread at id:87fsfuuxwn.fsf@thinkbox, a bug is discussed where the point and hl-line overlay get out of sync, leading the user to open the wrong message. As far as I can tell this is caused by notmuch-hl-mode being invoked too early. This change bypasses the logic preventing notmuch-search-hook being called only once, so that the overlay is updated later after the buffer is full(er). This change may lead to the overlay being updated multiple times; if this is annoying we can add a similar buffer local variable to ensure it is only called once. The extra logic to check notmuch-search-target-line reduces the flicker somewhat by not highlighting the first line every time.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T312-emacs-hl-line.sh2
1 files changed, 0 insertions, 2 deletions
diff --git a/test/T312-emacs-hl-line.sh b/test/T312-emacs-hl-line.sh
index 4cceed30..4697b671 100755
--- a/test/T312-emacs-hl-line.sh
+++ b/test/T312-emacs-hl-line.sh
@@ -104,7 +104,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
(line-number-at-pos (overlay-start hl-line-overlay)) 12))'
test_begin_subtest "line 12, search, refresh"
-test_subtest_known_broken
test_emacs_expect_t '(let ((notmuch-hl-line t))
(notmuch-search "tag:inbox")
(notmuch-test-wait)
@@ -140,7 +139,6 @@ test_emacs_expect_t '(let ((notmuch-hl-line t))
(line-number-at-pos (overlay-start hl-line-overlay)) 12))'
test_begin_subtest "hl-line disabled, search"
-test_subtest_known_broken
test_emacs_expect_t '(let ((notmuch-hl-line nil))
(notmuch-search "tag:inbox")
(notmuch-test-wait)