From 3afcfc97d67b70b0bd87b76d965042537b993b20 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 31 Aug 2020 22:43:42 -0400 Subject: [PATCH] ncreader: define NCREADER_OPTIONS_EMACSKEYS --- doc/man/man3/notcurses_reader.3.md | 3 +-- include/notcurses/notcurses.h | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/man/man3/notcurses_reader.3.md b/doc/man/man3/notcurses_reader.3.md index 48fc0b2f8..f1afbdcfb 100644 --- a/doc/man/man3/notcurses_reader.3.md +++ b/doc/man/man3/notcurses_reader.3.md @@ -18,6 +18,7 @@ struct notcurses; #define NCREADER_OPTION_HORSCROLL 0x0001 #define NCREADER_OPTION_VERSCROLL 0x0002 +#define NCREADER_OPTION_NOCMDKEYS 0x0004 typedef struct ncreader_options { uint64_t tchannels; // channels used for input @@ -85,8 +86,6 @@ preserving whitespace. Support for **NCREADER_OPTION_VERSCROLL** is not yet implemented. -Ideally, most of the functionality of **readline(3)** will be implemented. - **ncreader** does not buffer inputs in order to assemble EGCs from them. If inputs are to be processed as EGCs (as they should), the caller would need assemble the grapheme clusters. Of course, there is not yet any API through diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 9f0bafaf0..ecef57134 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -3014,8 +3014,12 @@ API int ncsubproc_destroy(struct ncsubproc* n); API int ncplane_qrcode(struct ncplane* n, ncblitter_e blitter, int* ymax, int* xmax, const void* data, size_t len); -#define NCREADER_OPTION_HORSCROLL 0x0001ull -#define NCREADER_OPTION_VERSCROLL 0x0002ull +// Enable horizontal scrolling. Virtual lines can then grow arbitrarily long. +#define NCREADER_OPTION_HORSCROLL 0x0001ull +// Enable vertical scrolling. You can then use arbitrarily many virtual lines. +#define NCREADER_OPTION_VERSCROLL 0x0002ull +// Disable all editing shortcuts. By default, emacs-style keys are available. +#define NCREADER_OPTION_NOCMDKEYS 0x0004ull typedef struct ncreader_options { uint64_t tchannels; // channels used for input