Mercurial > vim
view src/testdir/test_exit.vim @ 16650:06fd0eaada01 v8.1.1327
patch 8.1.1327: unnecessary scroll after horizontal split
commit https://github.com/vim/vim/commit/a9b2535f44f3265940a18d08520a9ad4ef7bda82
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 12 14:25:30 2019 +0200
patch 8.1.1327: unnecessary scroll after horizontal split
Problem: Unnecessary scroll after horizontal split.
Solution: Don't adjust to fraction if all the text fits in the window.
(Martin Kunev, closes #4367)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 12 May 2019 14:30:08 +0200 |
parents | 94e638936d3e |
children | 9c90cf08cfa8 |
line wrap: on
line source
" Tests for exiting Vim. source shared.vim func Test_exiting() let after = [ \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")', \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', \ 'quit', \ ] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) endif call delete('Xtestout') let after = [ \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")', \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', \ 'help', \ 'wincmd w', \ 'quit', \ ] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) endif call delete('Xtestout') let after = [ \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout")', \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', \ 'split', \ 'new', \ 'qall', \ ] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout')) endif call delete('Xtestout') let after = [ \ 'au QuitPre * call writefile(["QuitPre"], "Xtestout", "a")', \ 'au ExitPre * call writefile(["ExitPre"], "Xtestout", "a")', \ 'augroup nasty', \ ' au ExitPre * split', \ 'augroup END', \ 'quit', \ 'augroup nasty', \ ' au! ExitPre', \ 'augroup END', \ 'quit', \ ] if RunVim([], after, '') call assert_equal(['QuitPre', 'ExitPre', 'QuitPre', 'ExitPre'], \ readfile('Xtestout')) endif call delete('Xtestout') endfunc