Mercurial > vim
comparison src/testdir/test_window_cmd.vim @ 12977:2d817fd289ba v8.0.1364
patch 8.0.1364: there is no easy way to get the window position
commit https://github.com/vim/vim/commit/22044dc31788d9f1c2da7725269884d9923b4795
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 2 15:43:37 2017 +0100
patch 8.0.1364: there is no easy way to get the window position
Problem: There is no easy way to get the window position.
Solution: Add win_screenpos().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Dec 2017 15:45:04 +0100 |
parents | 7d7835ab8b37 |
children | 50aa6da392ce |
comparison
equal
deleted
inserted
replaced
12976:1a4d7b63c490 | 12977:2d817fd289ba |
---|---|
360 | 360 |
361 only | 361 only |
362 set equalalways& | 362 set equalalways& |
363 endfunc | 363 endfunc |
364 | 364 |
365 func Test_win_screenpos() | |
366 call assert_equal(1, winnr('$')) | |
367 split | |
368 vsplit | |
369 10wincmd _ | |
370 30wincmd | | |
371 call assert_equal([1, 1], win_screenpos(1)) | |
372 call assert_equal([1, 32], win_screenpos(2)) | |
373 call assert_equal([12, 1], win_screenpos(3)) | |
374 call assert_equal([0, 0], win_screenpos(4)) | |
375 only | |
376 endfunc | |
377 | |
365 func Test_window_jump_tag() | 378 func Test_window_jump_tag() |
366 help | 379 help |
367 /iccf | 380 /iccf |
368 call assert_match('^|iccf|', getline('.')) | 381 call assert_match('^|iccf|', getline('.')) |
369 call assert_equal(2, winnr('$')) | 382 call assert_equal(2, winnr('$')) |