Mercurial > vim
comparison src/testdir/test_functions.vim @ 15973:393a9a3a2da2 v8.1.0992
patch 8.1.0992: a :normal command resets the reg_executing() result
commit https://github.com/vim/vim/commit/cce713ddcc0c9ab29926c28e287cbb587a959b08
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 4 11:40:12 2019 +0100
patch 8.1.0992: a :normal command resets the reg_executing() result
Problem: A :normal command while executing a register resets the
reg_executing() result.
Solution: Save and restore reg_executing. (closes #4066)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Mar 2019 11:45:07 +0100 |
parents | c4efa095f323 |
children | 72987a858c96 |
comparison
equal
deleted
inserted
replaced
15972:1b570dab3589 | 15973:393a9a3a2da2 |
---|---|
1135 call feedkeys("qb@aq", 'xt') | 1135 call feedkeys("qb@aq", 'xt') |
1136 call assert_equal('b:a', s:reg_stat) | 1136 call assert_equal('b:a', s:reg_stat) |
1137 call feedkeys("q\"\"=s:save_reg_stat()\<CR>pq", 'xt') | 1137 call feedkeys("q\"\"=s:save_reg_stat()\<CR>pq", 'xt') |
1138 call assert_equal('":', s:reg_stat) | 1138 call assert_equal('":', s:reg_stat) |
1139 | 1139 |
1140 " :normal command saves and restores reg_executing | |
1141 let @q = ":call TestFunc()\<CR>:call s:save_reg_stat()\<CR>" | |
1142 func TestFunc() abort | |
1143 normal! ia | |
1144 endfunc | |
1145 call feedkeys("@q", 'xt') | |
1146 call assert_equal(':q', s:reg_stat) | |
1147 delfunc TestFunc | |
1148 | |
1140 bwipe! | 1149 bwipe! |
1141 delfunc s:save_reg_stat | 1150 delfunc s:save_reg_stat |
1142 unlet s:reg_stat | 1151 unlet s:reg_stat |
1143 endfunc | 1152 endfunc |
1144 | 1153 |