From b53034d423f055bbcca8b5a030dd51fcf458d182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Twupack?= Date: Fri, 1 Aug 2014 20:20:13 +0200 Subject: [PATCH] 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 --- src/nvim/testdir/Makefile | 2 +- src/nvim/testdir/test107.in | 38 +++++++++++++++++++++++++++++++++++++ src/nvim/testdir/test107.ok | 4 ++++ src/nvim/version.c | 2 +- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/nvim/testdir/test107.in create mode 100644 src/nvim/testdir/test107.ok diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index c93706fce2..21f2928593 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -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 diff --git a/src/nvim/testdir/test107.in b/src/nvim/testdir/test107.in new file mode 100644 index 0000000000..9143380f18 --- /dev/null +++ b/src/nvim/testdir/test107.in @@ -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! \t\=1Gzt\w\+" +:let s3=GetScreenStr(1) +:wincmd p +:call add(r, [line("w0"), s3]) +: +:exe ":norm! \t\=50Gzt\w\+" +:let s3=GetScreenStr(1) +:wincmd p +:call add(r, [line("w0"), s3]) +: +:exe ":norm! \t\=59Gzt\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: diff --git a/src/nvim/testdir/test107.ok b/src/nvim/testdir/test107.ok new file mode 100644 index 0000000000..3e0eda1fe7 --- /dev/null +++ b/src/nvim/testdir/test107.ok @@ -0,0 +1,4 @@ +start: +[1, '1 '] +[50, '50 '] +[59, '59 '] diff --git a/src/nvim/version.c b/src/nvim/version.c index 8214cb60b4..e4666e771f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -242,7 +242,7 @@ static int included_patches[] = { //318, //317, //316, - //315, + 315, //314, //313, //312,