aerc/widgets
Koni Marti 588be1a284 store: improve cursor position
Improve cursor re-positioning while filtering with and without threads.
Reposition cursor in client-side threading mode with a callback that is
set during store.NextPrev(). Run callback when the threads are
constructed in order to reposition the cursor correctly. The callback is
deactivated when store.Select() is called.

Steps to reproduce two issues:

* Reproduce issue 1:

1. Activate client-side threading
2. Apply a filter, e.g. :filter -f Koni
3. Move cursor around so that a message is highlighted
4. clear filter with :clear
5. The cursor is expected to remain on the selected message but is
   actually not

* Reproduce issue 2:

1. Activate client-side threading
2. Go the end of the message list
2. Apply a filter, e.g. :filter -f Koni
5. The cursor is now at the end of the filtered results instead of at
   the beginning

This patch fixes both of those issues. Tested in regular and threaded
view according to the following check list (expected behavior in
parenthesis):

1. Apply filter from a message that remains in the filter (cursor on message,
   message selected)
2. Apply filter from a message that will not remain (cursor at the top,
   no message selected)
3. Clear filter (cursor remains on message, message selected)
4. Scroll line-by-line (threads: cursor remains on line, does not "jump"
   with message)
5. Search (cursor on first result)

Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
2022-08-22 10:01:46 +02:00
..
account-wizard.go wizard: add plaintext password warning 2022-08-22 09:30:37 +02:00
account.go fix: Set proper UIConfig for msgstores 2022-08-22 09:30:37 +02:00
aerc.go binds: display active keybinds in a dialog box 2022-08-22 09:30:37 +02:00
authinfo.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
compose.go go: removed io/ioutil 2022-08-22 09:30:19 +02:00
dialog.go widgets: add dialog interface 2022-08-22 09:30:37 +02:00
dirlist.go fix: Set proper UIConfig for msgstores 2022-08-22 09:30:37 +02:00
dirtree.go dirtree: fix build errors 2022-08-22 09:57:23 +02:00
exline.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
getpasswd.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
headerlayout.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
listbox.go widgets: add list box with filter/scrollbar 2022-08-22 09:30:37 +02:00
msglist.go store: improve cursor position 2022-08-22 10:01:46 +02:00
msgviewer.go store: extract marking behavior and add tests 2022-08-22 09:30:37 +02:00
pgpinfo.go lint: remove ineffectual assignments (ineffassign) 2022-08-04 21:57:50 +02:00
providesmessage.go msgviewer: open http links from messages 2022-06-14 22:12:48 +02:00
scrollable.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
selector.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
spinner.go logging: added a log on panic 2022-03-23 20:56:09 +01:00
status.go uiconfig: use pointer references to uiConfig 2022-07-03 21:32:18 +02:00
tabhost.go Implement style configuration. 2020-08-06 21:42:06 +02:00
terminal.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00