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:
parent
41bf615f43
commit
f689fb7bed
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue