vim-patch:7.4.315 #1021

Problem:    Fixes for computation of topline not tested.
Solution:   Add test. (Hirohito Higashi)

https://code.google.com/p/vim/source/detail?r=646616b6ff4defcc7bef0b198b540f6d965a8126
This commit is contained in:
André Twupack
2014-08-01 20:20:13 +02:00
committed by Justin M. Keyes
parent 44afe610f8
commit b53034d423
4 changed files with 44 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ SCRIPTS := test_autoformat_join.out \
test91.out test92.out test93.out test94.out test95.out \
test96.out test97.out test98.out test99.out test100.out \
test101.out test102.out test103.out test104.out test105.out \
test106.out
test106.out test107.out
SCRIPTS_GUI := test16.out

View File

@@ -0,0 +1,38 @@
Tests for adjusting window and contents vim: set ft=vim :
STARTTEST
:so small.vim
:new
:call setline(1, range(1,256))
:let r=[]
:func! GetScreenStr(row)
: let str = ""
: for c in range(1,3)
: let str .= nr2char(screenchar(a:row, c))
: endfor
: return str
:endfunc
:
:exe ":norm! \<C-W>t\<C-W>=1Gzt\<C-W>w\<C-W>+"
:let s3=GetScreenStr(1)
:wincmd p
:call add(r, [line("w0"), s3])
:
:exe ":norm! \<C-W>t\<C-W>=50Gzt\<C-W>w\<C-W>+"
:let s3=GetScreenStr(1)
:wincmd p
:call add(r, [line("w0"), s3])
:
:exe ":norm! \<C-W>t\<C-W>=59Gzt\<C-W>w\<C-W>+"
:let s3=GetScreenStr(1)
::wincmd p
:call add(r, [line("w0"), s3])
:
:bwipeout!
:$put=r
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
ENDTEST
start:

View File

@@ -0,0 +1,4 @@
start:
[1, '1 ']
[50, '50 ']
[59, '59 ']

View File

@@ -242,7 +242,7 @@ static int included_patches[] = {
//318,
//317,
//316,
//315,
315,
//314,
//313,
//312,