Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following #233, here's an update for main.cpp (error message and comment), and the man page.
A first important point is that the error message was not shown on the console. The unexpected behavior was introduced with #231 as far as I can tell. I have no experience of ncurses, but my feeling is that initializing it (calling
init_ui
) before outputting to stderr/stdout messes up the console output. My tentative solution is to defer initialization to just before main loop (lines 301-304 in this PR), which in my tests works well for error and normal cases. (Before #231, behavior was also messy, in the sense that newlines were not displayed properly in the console.)The second point is that the long
setcap
command line in the man page looks quite ugly. I quickly tried to look at groff macros, but that looks like a lot of complicated stuff, so trying to find an elegant way to display that is not something I can help much with I'm afraid..