Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After calling an external program from the index, the currently selected message is shown in a different line (menu_scroll=yes) #4198

Open
the-x-at opened this issue Mar 12, 2024 · 0 comments
Labels

Comments

@the-x-at
Copy link
Contributor

the-x-at commented Mar 12, 2024

Expected Behaviour

I am using keybindings to execute external programs for fetching new mail and displaying links in emails to forward them to my web browser. In previous versions of NeoMutt (specified below) the index display was not altered when returning from the external command, that is, the currently selected message was positioned in the same row as before the call.

Actual Behaviour

A while ago NeoMutt started pushing the currently selected message in the index to the bottom of the message list. This is not a reordering, it's just that the index message list is moved such that the currently selected message is the last line in the visible area of the index, provided there are enough messages to display.

As an example, let's assume we have a mailbox with 100 messages and NeoMutt displays messages 30-50 with line 4 (message nr. 33) currently selected. After calling an external program via a keybinding, the index becomes shifted: messages 13-33 are shown and the selected message is now at the bottom.

This is a cosmetic issue. But the behavior is a bit irritating.

Steps to Reproduce

Fortunately, reproduction is easy. Call NeoMutt with the following line and a maildir mailbox with enough messages (i.e. at least twice the number of messages that can be displayed in the NeoMutt index) in ~/mail/testbox and press ctrl-b to execute a harmless command and wait till you return to the index. After approx. one second the index will shift.

neomutt -F /dev/null -n -e 'set folder="~/mail/testbox"; set spool_file="+INBOX"; set menu_scroll=yes; macro index \Cb "<pipe-entry> cat /dev/null <enter>" "Doc"'

Option menu_scroll is important, without setting this option, this cannot reproduced. Also, the current message may end up on a position other than the bottom if there are not enough messages in the mailbox. Overall, the index is shifted if there are more messages in the folder than can be displayed in the index.

How often does this happen?

  • Always

When did it start to happen?

From today's perspective, this started a long while ago. I unfortunately never had the time to pin this down for a bug tracker report. From my backups I can tell the following:

  • NeoMutt 20230407 or earlier did not have this issue.

  • NeoMutt 20231023 or later has this issue.

In case somebody is interested to dive into this, I can still narrow down the version of NeoMutt until we know exactly when this behavior was introduced.

NeoMutt Version

Version 20230407:

NeoMutt 20230407
Copyright (C) 1996-2022 Michael R. Elkins and others.
NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.
NeoMutt is free software, and you are welcome to redistribute it
under certain conditions; type 'neomutt -vv' for details.

System: Darwin 18.7.0 (x86_64)
ncurses: ncurses 6.3.20211021 (compiled with 6.3.20211021)
libiconv: 1.16
libidn2: 2.3.4 (compiled with 2.3.3)
GPGME: 1.18.0
OpenSSL: OpenSSL 3.0.8 7 Feb 2023
storage: lmdb

Configure options: --ssl --sasl --disable-idn --idn2 --gpgme --lmdb

Compilation CFLAGS: -isystem/usr/local/include -isystem/sw/include -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -I/sw/include -I/usr/local/include -DNCURSES_WIDECHAR -I/usr/local/include -I/usr/local/include

Default options:
  +attach_headers_color +compose_to_sender +compress +cond_date +debug
  +encrypt_to_self +forgotten_attachments +forwref +ifdef +imap +index_color
  +initials +limit_current_thread +multiple_fcc +nested_if +new_mail +nntp +pop
  +progress +quasi_delete +regcomp +reply_with_xorig +sensible_browser +sidebar
  +skip_quoted +smtp +status_color +timeout +tls_sni +trash

Compile options:
  -autocrypt +fcntl -flock -fmemopen +futimens +getaddrinfo -gnutls +gpgme
  -gsasl -gss +hcache -homespool +idn -inotify -locales_hack -lua -mixmaster
  +nls -notmuch +openssl +pgp +regex +sasl +smime -sqlite +sun_attachment

MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/usr/local/etc"

Version NeoMutt 20231023:

NeoMutt 20231023
Copyright (C) 1996-2022 Michael R. Elkins and others.
NeoMutt comes with ABSOLUTELY NO WARRANTY; for details type 'neomutt -vv'.
NeoMutt is free software, and you are welcome to redistribute it
under certain conditions; type 'neomutt -vv' for details.

System: Darwin 18.7.0 (x86_64)
ncurses: ncurses 6.3.20211021 (compiled with 6.3.20211021)
libiconv: 1.16
libidn2: 2.3.4 (compiled with 2.3.4)
GPGME: 1.22.0
OpenSSL: OpenSSL 1.1.1w  11 Sep 2023
storage: lmdb

Configure options: --ssl --sasl --idn2 --gpgme --lmdb

Compilation CFLAGS: -isystem/usr/local/include -isystem/sw/include -g -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -I/sw/include -I/usr/local/include -DNCURSES_WIDECHAR -I/usr/local/include -I/usr/local/include -O2

Default options:
  +attach_headers_color +compose_to_sender +compress +cond_date +debug
  +encrypt_to_self +forgotten_attachments +forwref +ifdef +imap +index_color
  +initials +limit_current_thread +multiple_fcc +nested_if +new_mail +nntp +pop
  +progress +quasi_delete +regcomp +reply_with_xorig +sensible_browser +sidebar
  +skip_quoted +smtp +status_color +timeout +tls_sni +trash

Compile options:
  -autocrypt +fcntl -flock -fmemopen +futimens +getaddrinfo -gnutls +gpgme
  -gsasl -gss +hcache -homespool +idn -inotify -locales_hack -lua -mixmaster
  +nls -notmuch +openssl +pgp +regex +sasl +smime -sqlite +sun_attachment
  +truecolor

MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/neomutt"
SENDMAIL="/usr/sbin/sendmail"
SYSCONFDIR="/usr/local/etc"

Extra Info

  • Operating System and its version - OSX 10.14.6 with Fink. NeoMutt compiled with gcc9 (ver 20230407) and gcc11 (ver 20231023), resp.
  • Were you using multiple copies of NeoMutt at once? No.
  • Were you using 'screen' or 'tmux'? No.
  • Is your email local (maildir) or remote (IMAP)? It's a local maildir.
@the-x-at the-x-at added the type:bug Bug label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant