diff options
author | V. Guruprasad <prasad@inspiredresearch.com> | 2019-10-02 07:54:23 -0400 |
---|---|---|
committer | V. Guruprasad <prasad@inspiredresearch.com> | 2019-10-03 12:12:25 -0400 |
commit | f835269f3bfdd6038ae1837619997817b767de3f (patch) | |
tree | a2d547f365012010e16afe3c524f28e00c6b3c0d /src/tui.c | |
parent | 9beb5c0a7b24f4fe05e2ad6b0b0c24c5939c3fe3 (diff) |
basic digraphs
Diffstat (limited to 'src/tui.c')
-rw-r--r-- | src/tui.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -92,6 +92,7 @@ #include "file.h" #include "format.h" #include "utils/string.h" +#include "digraphs.h" extern struct dictionary * d_colors_param; extern int cmd_pending; @@ -200,9 +201,19 @@ int ui_getch(wint_t * wd) { */ int ui_getch_b(wint_t * wd) { + wint_t digraph = 0; wtimeout(input_win, -1); move(0, rescol + inputline_pos + 1); wget_wch(input_win, wd); + if (*wd == ctl('k')) { + wget_wch(input_win, wd); + if (*wd != OKEY_ESC) { + digraph = *wd; + wget_wch(input_win, wd); + if (*wd != OKEY_ESC) + *wd = get_digraph(digraph, *wd); + } + } wtimeout(input_win, TIMEOUT_CURSES); if ( *wd != OKEY_ESC ) return 0; return -1; |