Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 27400:722db0819111 v8.2.4228
patch 8.2.4228: no tests for clicking in the GUI tabline
Commit: https://github.com/vim/vim/commit/b0ad2d92fd19e673ddbbc66742bae3f71778efde
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Jan 27 13:16:59 2022 +0000
patch 8.2.4228: no tests for clicking in the GUI tabline
Problem: No tests for clicking in the GUI tabline.
Solution: Add test functions to generate the events. Add tests using the
functions. (Yegappan Lakshmanan, closes #9638)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 27 Jan 2022 14:30:04 +0100 |
parents | 391eb1c30344 |
children | 95d6e3c9aa1e |
comparison
equal
deleted
inserted
replaced
27399:53c64ca1c4f3 | 27400:722db0819111 |
---|---|
1462 call StopVimInTerminal(buf) | 1462 call StopVimInTerminal(buf) |
1463 call delete('Xtest_diff_bin') | 1463 call delete('Xtest_diff_bin') |
1464 set diffopt&vim | 1464 set diffopt&vim |
1465 endfunc | 1465 endfunc |
1466 | 1466 |
1467 " Test for using the 'zi' command to invert 'foldenable' in diff windows (test | |
1468 " for the issue fixed by patch 6.2.317) | |
1469 func Test_diff_foldinvert() | |
1470 %bw! | |
1471 edit Xfile1 | |
1472 new Xfile2 | |
1473 new Xfile3 | |
1474 windo diffthis | |
1475 " open a non-diff window | |
1476 botright new | |
1477 1wincmd w | |
1478 call assert_true(getwinvar(1, '&foldenable')) | |
1479 call assert_true(getwinvar(2, '&foldenable')) | |
1480 call assert_true(getwinvar(3, '&foldenable')) | |
1481 normal zi | |
1482 call assert_false(getwinvar(1, '&foldenable')) | |
1483 call assert_false(getwinvar(2, '&foldenable')) | |
1484 call assert_false(getwinvar(3, '&foldenable')) | |
1485 normal zi | |
1486 call assert_true(getwinvar(1, '&foldenable')) | |
1487 call assert_true(getwinvar(2, '&foldenable')) | |
1488 call assert_true(getwinvar(3, '&foldenable')) | |
1489 | |
1490 " If the current window has 'noscrollbind', then 'zi' should not change | |
1491 " 'foldenable' in other windows. | |
1492 1wincmd w | |
1493 set noscrollbind | |
1494 normal zi | |
1495 call assert_false(getwinvar(1, '&foldenable')) | |
1496 call assert_true(getwinvar(2, '&foldenable')) | |
1497 call assert_true(getwinvar(3, '&foldenable')) | |
1498 | |
1499 " 'zi' should not change the 'foldenable' for windows with 'noscrollbind' | |
1500 1wincmd w | |
1501 set scrollbind | |
1502 normal zi | |
1503 call setwinvar(2, '&scrollbind', v:false) | |
1504 normal zi | |
1505 call assert_false(getwinvar(1, '&foldenable')) | |
1506 call assert_true(getwinvar(2, '&foldenable')) | |
1507 call assert_false(getwinvar(3, '&foldenable')) | |
1508 | |
1509 %bw! | |
1510 set scrollbind& | |
1511 endfunc | |
1512 | |
1467 " vim: shiftwidth=2 sts=2 expandtab | 1513 " vim: shiftwidth=2 sts=2 expandtab |