newsboat / newsboat

An RSS/Atom feed reader for text terminals
https://newsboat.org/
MIT License
2.96k stars 215 forks source link

Allow returning focus to empty list #2773

Open dennisschagt opened 3 months ago

dennisschagt commented 3 months ago

Resolves https://github.com/newsboat/newsboat/issues/2763

Stfl does not allow changing the focus to an empty list. This has the unfortunate effect that changing from a text edit (like our command line) to the feedlist does not work (if all feeds are filtered out). Instead, in that case, all keypresses end up in the (by that time) invisible command line.

This PR fixes the issue (workaround) by adding an empty item to the list. This does create a visible change (the top row of the list will have the background color set to be the same as a focussed item) However, I think that is not too bad and think it is better than the alternative of allowing freezes: image

Some alternatives with reasons why I think they are worse:

coveralls commented 3 months ago

Coverage Status

coverage: 59.819% (+0.005%) from 59.814% when pulling 4c848becd0bc60a76ca6d340d9196a422bd20114 on dennisschagt:fix-focus-empty-list into 9bcc073b28c373c00760a5a89712a4dafedf7c00 on newsboat:master.