Mercurial > vim
view src/testdir/test_reltime.vim @ 17926:ad7a4bd65f20 v8.1.1959
patch 8.1.1959: when using "firstline" in popup window text may jump
Commit: https://github.com/vim/vim/commit/a112f2d0035b0800b4a70dbb6f0e5f85e8ec84e5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 1 17:38:09 2019 +0200
patch 8.1.1959: when using "firstline" in popup window text may jump
Problem: When using "firstline" in popup window text may jump when
redrawing it. (Nick Jensen)
Solution: Set 'scrolloff' to zero in a popup window. (closes #4882)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 01 Sep 2019 17:45:03 +0200 |
parents | 8e9e9124c7a2 |
children | 2029737e6a22 |
line wrap: on
line source
" Tests for reltime() source check.vim CheckFeature reltime CheckFeature float func Test_reltime() let now = reltime() sleep 10m let later = reltime() let elapsed = reltime(now) call assert_true(reltimestr(elapsed) =~ '0\.0') call assert_true(reltimestr(elapsed) != '0.0') call assert_true(reltimefloat(elapsed) < 0.1) call assert_true(reltimefloat(elapsed) > 0.0) let same = reltime(now, now) call assert_equal('0.000', split(reltimestr(same))[0][:4]) call assert_equal(0.0, reltimefloat(same)) let differs = reltime(now, later) call assert_true(reltimestr(differs) =~ '0\.0') call assert_true(reltimestr(differs) != '0.0') call assert_true(reltimefloat(differs) < 0.1) call assert_true(reltimefloat(differs) > 0.0) endfunc