fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 114059e9549590d1b6633ebc503a4743ef735dcb parent c83f6164ce8203d51e2a48613c12c5933219b745 Author: John Hawthorn <john@hawthorn.email> Date: Sun, 9 Sep 2018 12:53:08 -0700 Add sequence to disable line wrap Diffstat:
| M | src/tty.c | | | 8 | ++++++++ |
| M | src/tty.h | | | 2 | ++ |
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/tty.c b/src/tty.c @@ -119,6 +119,14 @@ void tty_setnormal(tty_t *tty) { tty->fgcolor = 9; } +void tty_setnowrap(tty_t *tty) { + tty_printf(tty, "%c%c?7l", 0x1b, '['); +} + +void tty_setwrap(tty_t *tty) { + tty_printf(tty, "%c%c?7h", 0x1b, '['); +} + void tty_newline(tty_t *tty) { tty_printf(tty, "%c%cK\n", 0x1b, '['); } diff --git a/src/tty.h b/src/tty.h @@ -23,6 +23,8 @@ void tty_setfg(tty_t *tty, int fg); void tty_setinvert(tty_t *tty); void tty_setunderline(tty_t *tty); void tty_setnormal(tty_t *tty); +void tty_setnowrap(tty_t *tty); +void tty_setwrap(tty_t *tty); #define TTY_COLOR_BLACK 0 #define TTY_COLOR_RED 1