Not exercised anywhere except in the shell. I ran into it after running:
(print screen 34)
Introduced in commit d2f96cb0b6 on Sep 1. This is the sort of thing I
currently don't know how to write tests for :/
In the process we eliminate a whole bunch of duplication and give item
navigation a single source of truth.
Page-up isn't quite _identical_ to how it used to be before. Let's see
if it bothers us.
new test:
hit enter, go to thread view, hit enter again, go into thread view again. No crash.
Just bite the bullet and make item-index robust to single-thread tabs.
Tests to create when I start creating tests:
hide an item. Cursor moves to a new item.
hide an item that's not the bottom-most item, hit down arrow. Cursor moves to a new item.
hide an item that's not the top-most item, hit up arrow. Cursor moves to a new item.
hide top-most item. Cursor on new item. Hit up arrow. No change. Scroll down. New item.
hide bottom-most item. Cursor on new item. Hit down arrow. No change. Scroll up. New item.
open a thread. Hit down arrow. No crash (item-index not called).
To hide all comments from the same thread as the item at cursor, press
ctrl-h.
To later unhide everything, press ctrl-u.
Currently ctrl-u works by creating a whole new tab (that you can back
out of using Esc). That gives a way to undo it.
Still some rough edges:
update number of items in view when hiding a thread
avoid clipping menu in channel view
undo a single hide without giving up previous ones