Hi Bram,
2016-3-11(Fri) 6:20:14 UTC+9 Bram Moolenaar:
> Patch 7.4.1533
> Problem: Using feedkeys() with an empty string disregards 'x' option.
> Solution: Make 'x' work with an empty string. (Thinca)
> Files: src/eval.c, src/testdir/test_alot.vim,
> src/testdir/test_feedkeys.vim
>
>
> *** ../vim-7.4.1532/src/eval.c 2016-03-09 23:14:02.295262008 +0100
> --- src/eval.c 2016-03-10 22:12:50.157131273 +0100
> ***************
> *** 11839,11862 ****
> return;
>
> keys = get_tv_string(&argvars[0]);
> ! if (*keys != NUL)
> {
> ! if (argvars[1].v_type != VAR_UNKNOWN)
> {
> ! flags = get_tv_string_buf(&argvars[1], nbuf);
> ! for ( ; *flags != NUL; ++flags)
> {
> ! switch (*flags)
> ! {
> ! case 'n': remap = FALSE; break;
> ! case 'm': remap = TRUE; break;
> ! case 't': typed = TRUE; break;
> ! case 'i': insert = TRUE; break;
> ! case 'x': execute = TRUE; break;
> ! }
> }
> }
>
> /* Need to escape K_SPECIAL and CSI before putting the string in the
> * typeahead buffer. */
> keys_esc = vim_strsave_escape_csi(keys);
> --- 11839,11863 ----
> return;
>
> keys = get_tv_string(&argvars[0]);
> !
> ! if (argvars[1].v_type != VAR_UNKNOWN)
> {
> ! flags = get_tv_string_buf(&argvars[1], nbuf);
> ! for ( ; *flags != NUL; ++flags)
> {
> ! switch (*flags)
> {
> ! case 'n': remap = FALSE; break;
> ! case 'm': remap = TRUE; break;
> ! case 't': typed = TRUE; break;
> ! case 'i': insert = TRUE; break;
> ! case 'x': execute = TRUE; break;
> }
> }
> + }
>
> + if (*keys != NUL || execute)
> + {
> /* Need to escape K_SPECIAL and CSI before putting the string in the
> * typeahead buffer. */
> keys_esc = vim_strsave_escape_csi(keys);
> *** ../vim-7.4.1532/src/testdir/test_alot.vim 2016-03-08 17:08:38.562223096
> +0100
> --- src/testdir/test_alot.vim 2016-03-10 22:11:56.421701489 +0100
> ***************
> *** 5,10 ****
> --- 5,11 ----
> source test_cursor_func.vim
> source test_delete.vim
> source test_expand.vim
> + source test_feedkeys.vim
> source test_file_perm.vim
> source test_glob2regpat.vim
> source test_join.vim
> *** ../vim-7.4.1532/src/testdir/test_feedkeys.vim 2016-03-10
> 22:19:13.757062936 +0100
> --- src/testdir/test_feedkeys.vim 2016-03-10 22:16:08.903022957 +0100
> ***************
> *** 0 ****
> --- 1,10 ----
> + " Test feedkeys() function.
> +
> + func Test_feedkeys_x_with_empty_string()
> + new
> + call feedkeys("ifoo\<Esc>")
> + call assert_equal('', getline('.'))
> + call feedkeys('', 'x')
> + call assert_equal('foo', getline('.'))
> + quit!
> + endfunc
> *** ../vim-7.4.1532/src/version.c 2016-03-10 21:45:59.558192693 +0100
> --- src/version.c 2016-03-10 22:19:20.788988393 +0100
> ***************
> *** 745,746 ****
> --- 745,748 ----
> { /* Add new patch number below this line */
> + /**/
> + 1533,
> /**/
I think we need to add for execution individual test for items in the
test_alot.vim
Attached patch fixed this.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)
--
--
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.
diff --git a/src/Makefile b/src/Makefile
index f460a61..b658b1d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2003,9 +2003,11 @@ test_arglist \
test_cursor_func \
test_delete \
test_expand \
+ test_feedkeys \
test_glob2regpat \
test_hardcopy \
test_increment \
+ test_join \
test_json \
test_langmap \
test_lispwords \