Vim-like autocompletion in visual offset prompt #10912
This is my attempt to address issue #8476
It is still a proof of concept, since for now it only works in visual offset prompt. But it works everywhere you can call the offset prompt (in visual mode, in panels mode, and in graph mode).
The idea is to make it as general as possible, so it can also be used elsewhere.
The major change here is not only in the visual representation of autocompletion, but also the fact that this offers autocompletion as-you-type.
The keybindings are more or less equal to vim's: up/down arrow keys or Ctrl-n/Ctrl-p to move selection, Enter to select item. Tab to invoke the autocompletion window
Feedbacks and code reviews are more than welcome! I tried to make the code as clean as possible and tried my best to avoid overly hackish things. But I believe it can still be improved.
I'll also move all those functions in a separate file (for now they're just all crammed in dietline.c)
Thanks for the reviews! I tried to address all your suggestions in the two previous commits.
Right, I should have checked it. However, after seeing that using #, ", *, etc instead of the block character gave horrible results, I opted to delete SELWIDGET_SCROLLCHAR and fake a block char by drawing a space with the inverted background color, like this:
Ok, renamed it to R_CONS_CLEAR_LINE. I removed the first \r, but had to switch from