Mercurial > vim
comparison src/testdir/test_crypt.vim @ 20415:b582eb6ef192 v8.2.0762
patch 8.2.0762: buffer is not considered modified after setting crypt key
Commit: https://github.com/vim/vim/commit/76cb68309794def0fa7d1f2f72dd694b822186a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 15 22:30:38 2020 +0200
patch 8.2.0762: buffer is not considered modified after setting crypt key
Problem: Buffer is not considered modified after setting crypt key.
Solution: Set the modified flag. (Christian Brabandt, closes https://github.com/vim/vim/issues/6082)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 15 May 2020 22:45:04 +0200 |
parents | 8e9e9124c7a2 |
children | 08940efa6b4e |
comparison
equal
deleted
inserted
replaced
20414:cbf8715299d8 | 20415:b582eb6ef192 |
---|---|
108 | 108 |
109 set cryptmethod& | 109 set cryptmethod& |
110 bwipe! | 110 bwipe! |
111 endfunc | 111 endfunc |
112 | 112 |
113 func Test_crypt_set_key_changes_buffer() | |
114 | |
115 new Xtest1.txt | |
116 call setline(1, 'nothing') | |
117 set cryptmethod=blowfish2 | |
118 call feedkeys(":X\<CR>foobar\<CR>foobar\<CR>", 'xt') | |
119 call assert_fails(":q", "E37:") | |
120 w | |
121 set key=anotherkey | |
122 call assert_fails(":bw") | |
123 w | |
124 call feedkeys(":X\<CR>foobar\<CR>foobar\<CR>", 'xt') | |
125 call assert_fails(":bw") | |
126 w | |
127 let winnr = winnr() | |
128 wincmd p | |
129 call setwinvar(winnr, '&key', 'yetanotherkey') | |
130 wincmd p | |
131 call assert_fails(":bw") | |
132 w | |
133 | |
134 set cryptmethod& | |
135 set key= | |
136 bwipe! | |
137 call delete('Xtest1.txt') | |
138 endfunc |