Mercurial > vim
comparison src/testdir/test_undo.vim @ 10631:cbf17371627c v8.0.0205
patch 8.0.0205: wrong behavior after :undojoin
commit https://github.com/vim/vim/commit/5e4e1b12998b1ed99138cad1c5da4d430f798547
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 17 22:09:45 2017 +0100
patch 8.0.0205: wrong behavior after :undojoin
Problem: After :undojoin some commands don't work properly, such as :redo.
(Matthew Malcomson)
Solution: Don't set curbuf->b_u_curhead. (closes #1390)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 17 Jan 2017 22:15:04 +0100 |
parents | de77fa909414 |
children | ae45d497868f |
comparison
equal
deleted
inserted
replaced
10630:a7d9b73e8f3c | 10631:cbf17371627c |
---|---|
174 " Note: next change must not be as if typed | 174 " Note: next change must not be as if typed |
175 call feedkeys("occcc\<Esc>", 'x') | 175 call feedkeys("occcc\<Esc>", 'x') |
176 call assert_equal(['aaaa', 'bbbb', 'cccc'], getline(2, '$')) | 176 call assert_equal(['aaaa', 'bbbb', 'cccc'], getline(2, '$')) |
177 call feedkeys("u", 'xt') | 177 call feedkeys("u", 'xt') |
178 call assert_equal(['aaaa'], getline(2, '$')) | 178 call assert_equal(['aaaa'], getline(2, '$')) |
179 close! | 179 bwipe! |
180 endfunc | |
181 | |
182 func Test_undojoin_redo() | |
183 new | |
184 call setline(1, ['first line', 'second line']) | |
185 call feedkeys("ixx\<Esc>", 'xt') | |
186 call feedkeys(":undojoin | redo\<CR>", 'xt') | |
187 call assert_equal('xxfirst line', getline(1)) | |
188 call assert_equal('second line', getline(2)) | |
189 bwipe! | |
180 endfunc | 190 endfunc |
181 | 191 |
182 func Test_undo_write() | 192 func Test_undo_write() |
183 split Xtest | 193 split Xtest |
184 call feedkeys("ione one one\<Esc>", 'xt') | 194 call feedkeys("ione one one\<Esc>", 'xt') |