Patch 8.1.0668
Problem: No test for overstrike mode in the command line.
Solution: Add a test. (Dominique Pelle, closes #3742)
Files: src/testdir/test_cmdline.vim
*** ../vim-8.1.0667/src/testdir/test_cmdline.vim 2018-07-28
19:20:09.787586245 +0200
--- src/testdir/test_cmdline.vim 2018-12-31 21:02:00.554947899 +0100
***************
*** 581,584 ****
--- 581,613 ----
call assert_equal(1, setcmdpos(3))
endfunc
+ func Test_cmdline_overstrike()
+ let encodings = has('multi_byte') ? [ 'latin1', 'utf8' ] : [ 'latin1' ]
+ let encoding_save = &encoding
+
+ for e in encodings
+ exe 'set encoding=' . e
+
+ " Test overstrike in the middle of the command line.
+ call
feedkeys(":\"01234\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt')
+ call assert_equal('"0ab1cd4', @:)
+
+ " Test overstrike going beyond end of command line.
+ call
feedkeys(":\"01234\<home>\<right>\<right>ab\<right>\<insert>cdefgh\<enter>",
'xt')
+ call assert_equal('"0ab1cdefgh', @:)
+
+ " Test toggling insert/overstrike a few times.
+ call
feedkeys(":\"01234\<home>\<right>ab\<right>\<insert>cd\<right>\<insert>ef\<enter>",
'xt')
+ call assert_equal('"ab0cd3ef4', @:)
+ endfor
+
+ if has('multi_byte')
+ " Test overstrike with multi-byte characters.
+ call
feedkeys(":\"テキストエディタ\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>",
'xt')
+ call assert_equal('"テabキcdエディタ', @:)
+ endif
+
+ let &encoding = encoding_save
+ endfunc
+
set cpo&
*** ../vim-8.1.0667/src/version.c 2018-12-31 20:05:50.783224479 +0100
--- src/version.c 2018-12-31 21:00:26.507734786 +0100
***************
*** 801,802 ****
--- 801,804 ----
{ /* Add new patch number below this line */
+ /**/
+ 668,
/**/
--
You are only young once, but you can stay immature indefinitely.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.