(stdscr, text)
| 387 | |
| 388 | # Confirm dialog |
| 389 | def confirm_dialog(stdscr, text): |
| 390 | h,w = stdscr.getmaxyx() |
| 391 | while True: |
| 392 | stdscr.erase() |
| 393 | centered_addstr(stdscr, h//2 - 1, text + ' (Y/N)') |
| 394 | centered_addstr(stdscr, h//2 + 1, 'Y: Yes N: No') |
| 395 | stdscr.refresh() |
| 396 | ch = stdscr.getch() |
| 397 | if ch in (ord('y'), ord('Y')): |
| 398 | return True |
| 399 | elif ch in (ord('n'), ord('N'), 27): |
| 400 | return False |
| 401 | |
| 402 | # View note |
| 403 | def view_note_curses(stdscr, title, content): |
no test coverage detected