How can I reload the data in a menu without losing the current position?
For example, when a user "selects" an item, and an action is performed that changes the data. (Either updating the item, removing it, or adding a new item to the menu.) I'd like to reload the menu but still keep the cursor on the item that was just selected. What's the best way to do this?
For reference, this question seemed very close, but I don't think it covers the add/remove issue: How to replace a string menu item in ncurses & C
This question also seemed similar, but was too specific for me: Ncurses menu - remembering selection