comparison src/terminal.c @ 14029:d9fc15c833d5 v8.1.0032

patch 8.1.0032: BS in prompt buffer starts new line commit https://github.com/vim/vim/commit/6b810d92a9cd9378ab46ea0db07079cb789f9faa Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 4 17:28:44 2018 +0200 patch 8.1.0032: BS in prompt buffer starts new line Problem: BS in prompt buffer starts new line. Solution: Do not allows BS over the prompt. Make term_sendkeys() handle special keys. Add a test.
author Christian Brabandt <cb@256bit.org>
date Mon, 04 Jun 2018 17:30:08 +0200
parents 59121ffd7fce
children e271ca6f32f9
comparison
equal deleted inserted replaced
14028:ac4bbd93a284 14029:d9fc15c833d5
5092 if (term->tl_vterm == NULL) 5092 if (term->tl_vterm == NULL)
5093 return; 5093 return;
5094 5094
5095 while (*msg != NUL) 5095 while (*msg != NUL)
5096 { 5096 {
5097 send_keys_to_term(term, PTR2CHAR(msg), FALSE); 5097 int c;
5098 msg += MB_CPTR2LEN(msg); 5098
5099 if (*msg == K_SPECIAL && msg[1] != NUL && msg[2] != NUL)
5100 {
5101 c = TO_SPECIAL(msg[1], msg[2]);
5102 msg += 3;
5103 }
5104 else
5105 {
5106 c = PTR2CHAR(msg);
5107 msg += MB_CPTR2LEN(msg);
5108 }
5109 send_keys_to_term(term, c, FALSE);
5099 } 5110 }
5100 } 5111 }
5101 5112
5102 #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) || defined(PROTO) 5113 #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) || defined(PROTO)
5103 /* 5114 /*