Mercurial > vim
comparison src/testdir/test_normal.vim @ 29026:5baf5e50049b v8.2.5035
patch 8.2.5035: when splitting a window the changelist position moves
Commit: https://github.com/vim/vim/commit/e6f13b473cf2c270e4eab214e09be9825320c11b
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat May 28 10:49:44 2022 +0100
patch 8.2.5035: when splitting a window the changelist position moves
Problem: When splitting a window the changelist position moves.
Solution: Set the changelist index a bit later. (closes https://github.com/vim/vim/issues/10493)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 28 May 2022 12:00:03 +0200 |
parents | aa533dc41223 |
children | 432e1535ef2c |
comparison
equal
deleted
inserted
replaced
29025:81a69e9445c8 | 29026:5baf5e50049b |
---|---|
3224 set nomodifiable | 3224 set nomodifiable |
3225 call assert_fails('normal! grx', 'E21:') | 3225 call assert_fails('normal! grx', 'E21:') |
3226 call assert_fails('normal! gRx', 'E21:') | 3226 call assert_fails('normal! gRx', 'E21:') |
3227 set modifiable& | 3227 set modifiable& |
3228 enew! | 3228 enew! |
3229 endfunc | |
3230 | |
3231 " When splitting a window the changelist position is wrong. | |
3232 " Test the changelist position after splitting a window. | |
3233 " Test for the bug fixed by 7.4.386 | |
3234 func Test_changelist() | |
3235 let save_ul = &ul | |
3236 enew! | |
3237 call append('$', ['1', '2']) | |
3238 exe "normal i\<C-G>u" | |
3239 exe "normal Gkylpa\<C-G>u" | |
3240 set ul=100 | |
3241 exe "normal Gylpa\<C-G>u" | |
3242 set ul=100 | |
3243 normal gg | |
3244 vsplit | |
3245 normal g; | |
3246 call assert_equal([3, 2], [line('.'), col('.')]) | |
3247 normal g; | |
3248 call assert_equal([2, 2], [line('.'), col('.')]) | |
3249 call assert_fails('normal g;', 'E662:') | |
3250 new | |
3251 call assert_fails('normal g;', 'E664:') | |
3252 %bwipe! | |
3253 let &ul = save_ul | |
3254 endfunc | 3229 endfunc |
3255 | 3230 |
3256 func Test_nv_hat_count() | 3231 func Test_nv_hat_count() |
3257 %bwipeout! | 3232 %bwipeout! |
3258 let l:nr = bufnr('%') + 1 | 3233 let l:nr = bufnr('%') + 1 |