nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit dd7c13dd77cd8e63cd776dc703e23399b64afd32
parent 12fa5344cffcfd7aba726d4c594d3995d5edc840
Author: NRK <nrk@disroot.org>
Date:   Thu, 21 Oct 2021 17:28:13 +0600

fix: no mouse support inside vim terminal

we need to signal mouse event by printing these escape codes. the X10
escape code seems to be legacy format only used as fallback incase SGR
extended coordinates aren't supported.

Diffstat:
Msrc/nnn.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -2079,6 +2079,10 @@ static bool initcurses(void *oldmask) //intrflush(stdscr, FALSE); keypad(stdscr, TRUE); #ifndef NOMOUSE +#ifndef NOX11 + printf("\x1b[?1000h\n"); /* xterm X10 mouse mode */ + printf("\x1b[?1006h\n"); /* extended SGR mouse mode */ +#endif #if NCURSES_MOUSE_VERSION <= 1 mousemask(BUTTON1_PRESSED | BUTTON1_DOUBLE_CLICKED | BUTTON2_PRESSED | BUTTON3_PRESSED, (mmask_t *)oldmask);