Mercurial > vim
view src/testdir/test_interrupt.vim @ 33870:8f65cb02af21 v9.0.2145
patch 9.0.2145: wrong scrolling in insert mode with smoothscroll
Commit: https://github.com/vim/vim/commit/5b4d1fcbf06757bae32a894871b9a649c84eba7f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Dec 3 17:54:10 2023 +0100
patch 9.0.2145: wrong scrolling in insert mode with smoothscroll
Problem: Wrong scrolling in Insert mode with 'smoothscroll' at the
bottom of the window.
Solution: Don't use set_topline() when 'smoothscroll' is set.
fixes: #13612
closes: #13613
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Dec 2023 15:16:09 +0100 |
parents | 860f148e7a64 |
children |
line wrap: on
line source
" Test behavior of interrupt() let s:bufwritepre_called = 0 let s:bufwritepost_called = 0 func s:bufwritepre() let s:bufwritepre_called = 1 call interrupt() endfunction func s:bufwritepost() let s:bufwritepost_called = 1 endfunction func Test_interrupt() new Xinterrupt let n = 0 try au BufWritePre Xinterrupt call s:bufwritepre() au BufWritePost Xinterrupt call s:bufwritepost() w! catch /^Vim:Interrupt$/ endtry call assert_equal(1, s:bufwritepre_called) call assert_equal(0, s:bufwritepost_called) call assert_equal(0, filereadable('Xinterrupt')) au! BufWritePre au! BufWritePost endfunc " vim: shiftwidth=2 sts=2 expandtab