summaryrefslogtreecommitdiff
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-21 20:04:22 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-21 20:04:22 +0100
commitec2da36ca48b40c0654b32a8d2c9f52e796daa5e (patch)
treef6dab5f51ef8f54af0f45fa5b79129638f3c2737 /src/getchar.c
parent41baa7983aa81b0343b053e6a672cf8224a10245 (diff)
downloadvim-ec2da36ca48b40c0654b32a8d2c9f52e796daa5e.zip
patch 8.0.0210: no support for bracketed paste
Problem: Vim does not support bracketed paste, as implemented by xterm and other terminals. Solution: Add t_BE, t_BD, t_PS and t_PE.
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 9adeafa5b..9583d9a8f 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1817,6 +1817,12 @@ plain_vgetc(void)
{
c = safe_vgetc();
} while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
+
+ if (c == K_PS)
+ /* Only handle the first pasted character. Drop the rest, since we
+ * don't know what to do with it. */
+ c = bracketed_paste(PASTE_ONE_CHAR, FALSE, NULL);
+
return c;
}
@@ -1906,7 +1912,7 @@ vungetc(int c)
}
/*
- * get a character:
+ * Get a character:
* 1. from the stuffbuffer
* This is used for abbreviated commands like "D" -> "d$".
* Also used to redo a command for ".".