From 8fd3725cc8d54bced0a8fe1474986d93e9ef0b5b Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Sat, 25 Aug 2018 15:07:52 -0700 Subject: tui: Hint wrapped lines to terminals. Previously, when neovim would wrap a line across multiple lines, terminal emulators could not detect that the lines represent a single wrapped line as opposed to several separate lines. As a result, many terminals' selection/copying functionality would treat a wrapped line as several newline-delimited lines. Fix this by reenabling a "special trick" from Vim. When a line is wrapped, write the last character of that line followed by the first character of the next line to the terminal. This hints to the terminal that the next line is a continuation of the current line. Extends the raw_line event with a "wrap" parameter which controls when to do wrap hinting. --- src/nvim/event/defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/event') diff --git a/src/nvim/event/defs.h b/src/nvim/event/defs.h index 55b2d277bb..fdd4f17d5c 100644 --- a/src/nvim/event/defs.h +++ b/src/nvim/event/defs.h @@ -4,7 +4,7 @@ #include #include -#define EVENT_HANDLER_MAX_ARGC 9 +#define EVENT_HANDLER_MAX_ARGC 10 typedef void (*argv_callback)(void **argv); typedef struct message { -- cgit