post-compose, aerc returns to the wrong tab

I have three accounts defined, which become the first three tabs in aerc: a local, and two IMAPs. If I reply to a mail in my second account (=first IMAP account), the compose window opens as window #4. When I send the mail, aerc switches to account #3 — causing that IMAP account to connect for the first time.

Ideally compose would return focus to the tab that spawned it.

Assigned to
1 year, 14 days ago
1 year, 11 days ago

~labrat 1 year, 13 days ago

I can't reproduce it. Can you show the exact steps you do?

I have configured aerc to use 3 accounts then do the following:

  1. switch to the second tab
  2. reply to a message
  3. reply opens in tab #4, compose a message
  4. hit send (y)
  5. tab #2 is selected (the account the reply was spawned in)

So at least for me it does what it is supposed to

~jon REPORTED FIXED 1 year, 13 days ago

I can't reproduce it. Can you show the exact steps you do?

You know what, neither can I this morning. I'll close for now and if I hit this again investigate further.

~jeffas 1 year, 12 days ago

I have a case which should reproduce a similar issue, though am not sure if it is the exact one you've experienced:

  1. in any aerc view run ":term sleep 3"

  2. a new tab is created to run the command

  3. change to another tab before the sleep completes (not the tab that the command was run from)

  4. let the command finish in its own time and the history will be popped, leading to a change of tab.

I've submitted a patch for this here: https://lists.sr.ht/~sircmpwn/aerc/%3C20191008173040.757012-1-dev%40jeffas.io%3E

~jon FIXED REPORTED 1 year, 11 days ago

I've hit this a couple more times now so I'll re-open, although I can't "clean room" reproduce. I suspect that there are some events taking place behind the scenes (perhaps IMAP stuff?) that impacts which tab is returned to.

~jon 1 year, 11 days ago

I'll apply ~jeffas patch and see what happens over the next week.

~jeffas 1 year, 11 days ago

While my patch seems to fix something, I think there is still an issue. To reproduce (example with two accounts):

  1. View a message from the first account
  2. run ":term ls" while viewing the message
  3. view quickly switches to the term for ls but it finishes and is back on the message view, all good so far
  4. close the message viewer and get returned to account #2 which is not where the history should take us

I'll try and take a look at this and see if I can find what's going on

Register here or Log in to comment, or comment via email.