notmuch-vim icon indicating copy to clipboard operation
notmuch-vim copied to clipboard

thread view: last message line not shown

Open mattmart3 opened this issue 8 months ago • 0 comments

In thread view I am not seeing the last message line of the last mail in the thread. Here's an example of an email that contains 3 message body lines:

<[email protected]> 30.05.24 10:20:50 (["inbox", "sent", "unread"])
Subject: Test from notmuch-nvim
To: <[email protected]>
Cc: 
Date: Thu, 30 May 2024 10:20:50 +0200
--- text/plain ---
First message line.
Second message line.

It should display Third message line. at the end.

I don't know what is causing the issue but here's a workaround that let it display the last line as well:

diff --git a/plugin/notmuch.vim b/plugin/notmuch.vim
index 238bea89f643..870e72c9c06f 100644
--- a/plugin/notmuch.vim
+++ b/plugin/notmuch.vim
@@ -358,6 +358,7 @@ ruby << EOF
                        b << ""
                        nm_m.end = b.count
                end
+               b << " "
                b.delete(b.count)
        end
        $messages.each_with_index do |msg, i|

My guess it that in this way it just inserts an additional " " line which won't be displayed.

Setup:

  • distro: Arch linux

  • notmuch: v0.38.3

  • notmuch-vim: at latest master commit: 4270c7e4d4ee ("Fix configuration parsing bug")

  • neovim: v0.10.0

  • ruby deps:

    gem list | grep -e neovim -e mail 
    mail (2.8.1)
    neovim (0.9.1)
    

mattmart3 avatar May 30 '24 08:05 mattmart3