Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 14893:291656f731c9 v8.1.0458
patch 8.1.0458: ml_get error and crash when using "do"
commit https://github.com/vim/vim/commit/df77cef92ec034796723ffa3adb12e8b46daa98e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 7 17:46:42 2018 +0200
patch 8.1.0458: ml_get error and crash when using "do"
Problem: Ml_get error and crash when using "do".
Solution: Adjust cursor position also when diffupdate is not needed.
(Hirohito Higashi)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Oct 2018 18:00:05 +0200 |
parents | a8ed1cb85859 |
children | 5d52b21b2e7f |
comparison
equal
deleted
inserted
replaced
14892:983b36c27a2b | 14893:291656f731c9 |
---|---|
275 | 275 |
276 windo diffoff | 276 windo diffoff |
277 %bwipe! | 277 %bwipe! |
278 endfunc | 278 endfunc |
279 | 279 |
280 func Test_do_lastline() | |
281 e! one | |
282 call setline(1, ['1','2','3','4','5','6']) | |
283 diffthis | |
284 | |
285 new two | |
286 call setline(1, ['2','4','5']) | |
287 diffthis | |
288 | |
289 1 | |
290 norm dp]c | |
291 norm dp]c | |
292 wincmd w | |
293 call assert_equal(4, line('$')) | |
294 norm G | |
295 norm do | |
296 call assert_equal(3, line('$')) | |
297 | |
298 windo diffoff | |
299 %bwipe! | |
300 endfunc | |
301 | |
280 func Test_diffoff() | 302 func Test_diffoff() |
281 enew! | 303 enew! |
282 call setline(1, ['Two', 'Three']) | 304 call setline(1, ['Two', 'Three']) |
283 redraw | 305 redraw |
284 let normattr = screenattr(1, 1) | 306 let normattr = screenattr(1, 1) |