6 ex_gui_suggest_8c example
gullradriel edited this page 2026-10-09 00:55:18 +02:00

ex_gui_suggest.c

Completions offered under a textarea while it is typed in (headless). n_gui_textarea_set_suggest() hands the word under the cursor to a provider and shows what it answers in a panel under the field. The keys it takes while that panel is up - Up, Down, ENTER, TAB, ESCAPE - are keys the field would otherwise use, so they are answered by the panel and the field never hears them.

The separator set is what makes it usable in a field holding a list: with "," the word being completed is the one the cursor is in, and picking one replaces that word and leaves the rest of the line alone.