changeset 13406:4e30f3f4cb78 v8.0.1577

patch 8.0.1577: virtual replace test fails on MS-Windows commit https://github.com/vim/vim/commit/e7808481507b9e11ae73c8f865e95eb2d20f6cc8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 6 13:17:23 2018 +0100 patch 8.0.1577: virtual replace test fails on MS-Windows Problem: Virtual replace test fails on MS-Windows. Solution: Make adding a termcap entry work for a builtin terminal. Restore terminal keys in a better way.
author Christian Brabandt <cb@256bit.org>
date Tue, 06 Mar 2018 13:30:06 +0100
parents b65fa9463baa
children a6048fe19672
files src/term.c src/testdir/test_visual.vim src/version.c
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -2278,6 +2278,7 @@ add_termcap_entry(char_u *name, int forc
 	    if (termp->bt_string != NULL)	/* found it */
 	    {
 		key = TERMCAP2KEY(name[0], name[1]);
+		++termp;
 		while (termp->bt_entry != (int)KS_NAME)
 		{
 		    if ((int)termp->bt_entry == key)
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -157,6 +157,8 @@ endfunc
 
 " Test Virtual replace mode.
 func Test_virtual_replace()
+  let save_t_kD = &t_kD
+  let save_t_kb = &t_kb
   exe "set t_kD=\<C-V>x7f t_kb=\<C-V>x08"
   enew!
   exe "normal a\nabcdefghi\njk\tlmn\n    opq	rst\n\<C-D>uvwxyz"
@@ -186,7 +188,9 @@ func Test_virtual_replace()
   call assert_equal(['AB......CDEFGHI.Jkl',
 	      \ 'AB	IJKLMNO	QRst'], getline(12, 13))
   enew!
-  set noai bs&vim t_kD&vim t_kb&vim
+  set noai bs&vim
+  let &t_kD = save_t_kD
+  let &t_kb = save_t_kb
 endfunc
 
 " Test Virtual replace mode.
--- a/src/version.c
+++ b/src/version.c
@@ -767,6 +767,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1577,
+/**/
     1576,
 /**/
     1575,