Mercurial > vim
view src/testdir/test_scroll_opt.vim @ 18689:8cc12c8d7842 v8.1.2336
patch 8.1.2336: when an expr mapping moves the cursor it is not restored
Commit: https://github.com/vim/vim/commit/4ebe0e62d097d68c5312f9c32714fb41a4c947a3
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 22 20:55:40 2019 +0100
patch 8.1.2336: when an expr mapping moves the cursor it is not restored
Problem: When an expr mapping moves the cursor it is not restored.
Solution: Position the cursor after an expr mapping. (closes https://github.com/vim/vim/issues/5256)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 22 Nov 2019 21:00:04 +0100 |
parents | f8f505ffc0a6 |
children | 08940efa6b4e |
line wrap: on
line source
" Test for reset 'scroll' " func Test_reset_scroll() let scr = &l:scroll setlocal scroll=1 setlocal scroll& call assert_equal(scr, &l:scroll) setlocal scroll=1 setlocal scroll=0 call assert_equal(scr, &l:scroll) try execute 'setlocal scroll=' . (winheight(0) + 1) " not reached call assert_false(1) catch call assert_exception('E49:') endtry split let scr = &l:scroll setlocal scroll=1 setlocal scroll& call assert_equal(scr, &l:scroll) setlocal scroll=1 setlocal scroll=0 call assert_equal(scr, &l:scroll) quit! endfunc