Mercurial > vim
diff src/getchar.c @ 10640:27be410d6d29 v8.0.0210
patch 8.0.0210: no support for bracketed paste
commit https://github.com/vim/vim/commit/ec2da36ca48b40c0654b32a8d2c9f52e796daa5e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 21 20:04:22 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 21 Jan 2017 20:15:04 +0100 |
parents | 055b1633aed7 |
children | fa69f6272692 |
line wrap: on
line diff
--- 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 ".".