To: vim_dev@googlegroups.com Subject: Patch 8.0.1299 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1299 Problem: Bracketed paste does not work well in terminal window. Solution: Send translated string to job right away. (Ozaki Kiichi, closes #2341) Files: src/terminal.c *** ../vim-8.0.1298/src/terminal.c 2017-11-09 17:33:06.673311788 +0100 --- src/terminal.c 2017-11-16 12:51:02.593654640 +0100 *************** *** 40,46 **** * TODO: * - in GUI vertical split causes problems. Cursor is flickering. (Hirohito * Higashi, 2017 Sep 19) - * - double click in Window toolbar starts Visual mode (but not always?). * - Shift-Tab does not work. * - after resizing windows overlap. (Boris Staletic, #2164) * - Redirecting output does not work on MS-Windows, Test_terminal_redir_file() --- 40,45 ---- *************** *** 732,738 **** VTerm *vterm = term->tl_vterm; VTermKey key = VTERM_KEY_NONE; VTermModifier mod = VTERM_MOD_NONE; ! int mouse = FALSE; switch (c) { --- 731,737 ---- VTerm *vterm = term->tl_vterm; VTermKey key = VTERM_KEY_NONE; VTermModifier mod = VTERM_MOD_NONE; ! int other = FALSE; switch (c) { *************** *** 809,830 **** key = VTERM_KEY_UP; break; case TAB: key = VTERM_KEY_TAB; break; ! case K_MOUSEUP: mouse = term_send_mouse(vterm, 5, 1); break; ! case K_MOUSEDOWN: mouse = term_send_mouse(vterm, 4, 1); break; case K_MOUSELEFT: /* TODO */ return 0; case K_MOUSERIGHT: /* TODO */ return 0; case K_LEFTMOUSE: ! case K_LEFTMOUSE_NM: mouse = term_send_mouse(vterm, 1, 1); break; ! case K_LEFTDRAG: mouse = term_send_mouse(vterm, 1, 1); break; case K_LEFTRELEASE: ! case K_LEFTRELEASE_NM: mouse = term_send_mouse(vterm, 1, 0); break; ! case K_MIDDLEMOUSE: mouse = term_send_mouse(vterm, 2, 1); break; ! case K_MIDDLEDRAG: mouse = term_send_mouse(vterm, 2, 1); break; ! case K_MIDDLERELEASE: mouse = term_send_mouse(vterm, 2, 0); break; ! case K_RIGHTMOUSE: mouse = term_send_mouse(vterm, 3, 1); break; ! case K_RIGHTDRAG: mouse = term_send_mouse(vterm, 3, 1); break; ! case K_RIGHTRELEASE: mouse = term_send_mouse(vterm, 3, 0); break; case K_X1MOUSE: /* TODO */ return 0; case K_X1DRAG: /* TODO */ return 0; case K_X1RELEASE: /* TODO */ return 0; --- 808,829 ---- key = VTERM_KEY_UP; break; case TAB: key = VTERM_KEY_TAB; break; ! case K_MOUSEUP: other = term_send_mouse(vterm, 5, 1); break; ! case K_MOUSEDOWN: other = term_send_mouse(vterm, 4, 1); break; case K_MOUSELEFT: /* TODO */ return 0; case K_MOUSERIGHT: /* TODO */ return 0; case K_LEFTMOUSE: ! case K_LEFTMOUSE_NM: other = term_send_mouse(vterm, 1, 1); break; ! case K_LEFTDRAG: other = term_send_mouse(vterm, 1, 1); break; case K_LEFTRELEASE: ! case K_LEFTRELEASE_NM: other = term_send_mouse(vterm, 1, 0); break; ! case K_MIDDLEMOUSE: other = term_send_mouse(vterm, 2, 1); break; ! case K_MIDDLEDRAG: other = term_send_mouse(vterm, 2, 1); break; ! case K_MIDDLERELEASE: other = term_send_mouse(vterm, 2, 0); break; ! case K_RIGHTMOUSE: other = term_send_mouse(vterm, 3, 1); break; ! case K_RIGHTDRAG: other = term_send_mouse(vterm, 3, 1); break; ! case K_RIGHTRELEASE: other = term_send_mouse(vterm, 3, 0); break; case K_X1MOUSE: /* TODO */ return 0; case K_X1DRAG: /* TODO */ return 0; case K_X1RELEASE: /* TODO */ return 0; *************** *** 858,865 **** #ifdef FEAT_AUTOCMD case K_CURSORHOLD: return 0; #endif ! case K_PS: vterm_keyboard_start_paste(vterm); return 0; ! case K_PE: vterm_keyboard_end_paste(vterm); return 0; } /* --- 857,868 ---- #ifdef FEAT_AUTOCMD case K_CURSORHOLD: return 0; #endif ! case K_PS: vterm_keyboard_start_paste(vterm); ! other = TRUE; ! break; ! case K_PE: vterm_keyboard_end_paste(vterm); ! other = TRUE; ! break; } /* *************** *** 871,877 **** if (key != VTERM_KEY_NONE) /* Special key, let vterm convert it. */ vterm_keyboard_key(vterm, key, mod); ! else if (!mouse) /* Normal character, let vterm convert it. */ vterm_keyboard_unichar(vterm, c, mod); --- 874,880 ---- if (key != VTERM_KEY_NONE) /* Special key, let vterm convert it. */ vterm_keyboard_key(vterm, key, mod); ! else if (!other) /* Normal character, let vterm convert it. */ vterm_keyboard_unichar(vterm, c, mod); *** ../vim-8.0.1298/src/version.c 2017-11-14 20:22:54.628809431 +0100 --- src/version.c 2017-11-16 12:52:23.088409238 +0100 *************** *** 768,769 **** --- 768,771 ---- { /* Add new patch number below this line */ + /**/ + 1299, /**/ -- Every engineer dreams about saving the universe and having sex with aliens. This is much more glamorous than the real life of an engineer, which consists of hiding from the universe and having sex without the participation of other life forms. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///