Mercurial > vim
diff src/testdir/test_excmd.vim @ 25883:826c36b4640b v8.2.3475
patch 8.2.3475: expression register set by not executed put command
Commit: https://github.com/vim/vim/commit/08d7b1c82866a61b61a55e55b6c190dba04e54ea
Author: kuuote <znmxodq1@gmail.com>
Date: Mon Oct 4 22:17:36 2021 +0100
patch 8.2.3475: expression register set by not executed put command
Problem: Expression register set by not executed put command.
Solution: Do not set the register if the command is skipped. (closes https://github.com/vim/vim/issues/8909)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Oct 2021 23:30:03 +0200 |
parents | 8e9886ce88b3 |
children | 485c7c4afeb7 |
line wrap: on
line diff
--- a/src/testdir/test_excmd.vim +++ b/src/testdir/test_excmd.vim @@ -647,4 +647,12 @@ func Test_command_not_implemented_E319() endif endfunc +func Test_not_break_expression_register() + call setreg('=', '1+1') + if 0 + put =1 + endif + call assert_equal('1+1', getreg('=', 1)) +endfunc + " vim: shiftwidth=2 sts=2 expandtab