gemini: slightly cleaner rendering of owner input

This still only works if I remove the call to `refresh()` inside
`Wgetch()`. With that call no keystrokes are displayed. Looks like
ncurses doesn't include user input when refreshing the window. Unclear
if there's an easy way to support that while keeping the menu visible.
This commit is contained in:
Kartik K. Agaram 2021-12-21 16:15:40 -08:00
parent 41bf615f43
commit f689fb7bed
1 changed files with 7 additions and 0 deletions

View File

@ -203,8 +203,15 @@
>function edit_line(window)
> local result = ''
> local cursor = 1
> local screen_rows, screen_cols = window:getmaxyx()
> while true do
> window:mvaddstr(screen_rows-1, 9, '')
> window:clrtoeol()
> window:mvaddstr(screen_rows-1, 9, result)
> window:attron(curses.A_REVERSE)
> -- window:refresh()
> local key = curses.getch()
> window:attrset(curses.A_NORMAL)
> if key >= 32 and key < 127 then
> local screen_rows, screen_cols = window:getmaxyx()
> if #result < screen_cols then