Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-29 Fir de Conversatie h_east
Hi Bram and Nobuhiro,

2014/05/28(Wed) 20:42:17 UTC+9 Bram Moolenaar:
 Nobuhiro Takasaki wrote:
 
 
 
  It is a test that is an error in the patch before.
 
  It does not result in an error in the patch after.
 
  The correctness of meaning, there is no confidence.
 
  
 
  If there is a better way, that would be better.
 
 
 
 It appears the patch fixes the reported problem, but the test still
 
 fails.  Problem is that the test depends on the terminal height.

I create a new test107.
Please check this.

--
Best regards,
Hirohito Higashi

 
 
 
 -- 
 
 From the classified section of a city newspaper:
 
 Dog for sale: eats anything and is fond of children.
 
 
 
  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
 
 ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
 
 \\\  an exciting new programming language -- http://www.Zimbu.org///
 
  \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r b36f5435ec98 src/testdir/Make_amiga.mak
--- a/src/testdir/Make_amiga.mak	Wed May 28 21:40:52 2014 +0200
+++ b/src/testdir/Make_amiga.mak	Thu May 29 15:10:57 2014 +0900
@@ -35,7 +35,7 @@
 		test89.out test90.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 \
+		test104.out test105.out test106.out test107.out \
 		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
@@ -161,6 +161,7 @@
 test104.out: test104.in
 test105.out: test105.in
 test106.out: test106.in
+test107.out: test107.in
 test_autoformat_join.out: test_autoformat_join.in
 test_eval.out: test_eval.in
 test_options.out: test_options.in
diff -r b36f5435ec98 src/testdir/Make_dos.mak
--- a/src/testdir/Make_dos.mak	Wed May 28 21:40:52 2014 +0200
+++ b/src/testdir/Make_dos.mak	Thu May 29 15:10:57 2014 +0900
@@ -34,7 +34,7 @@
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test98.out test99.out \
 		test100.out test101.out test102.out test103.out test104.out \
-		test105.out test106.out \
+		test105.out test106.out test107.out \
 		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
diff -r b36f5435ec98 src/testdir/Make_ming.mak
--- a/src/testdir/Make_ming.mak	Wed May 28 21:40:52 2014 +0200
+++ b/src/testdir/Make_ming.mak	Thu May 29 15:10:57 2014 +0900
@@ -54,7 +54,7 @@
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test98.out test99.out \
 		test100.out test101.out test102.out test103.out test104.out \
-		test105.out test106.out \
+		test105.out test106.out test107.out \
 		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
diff -r b36f5435ec98 src/testdir/Make_os2.mak
--- a/src/testdir/Make_os2.mak	Wed May 28 21:40:52 2014 +0200
+++ b/src/testdir/Make_os2.mak	Thu May 29 15:10:57 2014 +0900
@@ -36,7 +36,7 @@
 		test89.out test90.out test91.out test92.out test93.out \
 		test94.out test95.out test96.out test98.out test99.out \
 		test100.out test101.out test102.out test103.out test104.out \
-		test105.out test106.out \
+		test105.out test106.out test107.out \
 		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
diff -r b36f5435ec98 src/testdir/Make_vms.mms
--- a/src/testdir/Make_vms.mms	Wed May 28 21:40:52 2014 +0200
+++ b/src/testdir/Make_vms.mms	Thu May 29 15:10:57 2014 +0900
@@ -95,7 +95,7 @@
 	 test90.out test91.out test92.out test93.out test94.out \
 	 test95.out test96.out test98.out test99.out \
 	 test100.out test101.out test103.out test104.out \
-	 test105.out test106.out \
+	 test105.out test106.out test107.out \
 	 test_autoformat_join.out \
 	 test_eval.out \
 	 test_options.out
diff -r b36f5435ec98 src/testdir/Makefile
--- a/src/testdir/Makefile	Wed May 28 21:40:52 2014 +0200
+++ b/src/testdir/Makefile	Thu May 29 15:10:57 2014 +0900
@@ -32,7 +32,7 @@
 		test89.out test90.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 \
+		test104.out test105.out test106.out test107.out \
 		test_autoformat_join.out \
 		test_eval.out \
 		test_options.out
diff -r b36f5435ec98 src/testdir/test107.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/src/testdir/test107.in	Thu May 29 15:10:57 2014 +0900
@@ -0,0 +1,38 @@
+Tests for adjusting window and contents vim: 

Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-29 Fir de Conversatie Bram Moolenaar

Hirohito Higashi wrote:

 Hi Bram and Nobuhiro,
 
 2014/05/28(Wed) 20:42:17 UTC+9 Bram Moolenaar:
  Nobuhiro Takasaki wrote:
  
  
  
   It is a test that is an error in the patch before.
  
   It does not result in an error in the patch after.
  
   The correctness of meaning, there is no confidence.
  
   
  
   If there is a better way, that would be better.
  
  
  
  It appears the patch fixes the reported problem, but the test still
  
  fails.  Problem is that the test depends on the terminal height.
 
 I create a new test107.
 Please check this.

Thanks!  I verified it fails before patch 7.4.309 and passes after it.

I know it can be difficult to write tests like this.

-- 
hundred-and-one symptoms of being an internet addict:
228. You spend Saturday night making the counter on your home page
 pass that 2000 mark.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-28 Fir de Conversatie Bram Moolenaar

Nobuhiro Takasaki wrote:

 It is a test that is an error in the patch before.
 It does not result in an error in the patch after.
 The correctness of meaning, there is no confidence.
 
 If there is a better way, that would be better.

It appears the patch fixes the reported problem, but the test still
fails.  Problem is that the test depends on the terminal height.

-- 
From the classified section of a city newspaper:
Dog for sale: eats anything and is fond of children.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-26 Fir de Conversatie Nobuhiro Takasaki
It is a test that is an error in the patch before.
It does not result in an error in the patch after.
The correctness of meaning, there is no confidence.

If there is a better way, that would be better.


Thanks.
Nobuhiro Takasaki

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


test107.in
Description: Binary data


test107.ok
Description: Binary data


Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-25 Fir de Conversatie Bram Moolenaar

Ron Aaron wrote:

 To repro the issue:
 
gvim -u NONE somefile
:sp
50G
 
 Now switch to the second window
C-WW
 
 And resize it:
C-W+
 
 
 Note that the first window will jump back to line 1
 
 Seen on Linux (Mint 17, 64 bit)

I can reproduce it.

-- 
panic(Fod fight!);
-- In the kernel source aha1542.c, after detecting a bad segment list

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-25 Fir de Conversatie Manuel Ortega
On Sun, May 25, 2014 at 9:17 AM, Bram Moolenaar b...@moolenaar.net wrote:

 Ron Aaron wrote:
  To repro the issue:
 gvim -u NONE somefile
 :sp
 50G
 
  Now switch to the second window
 C-WW
 
  And resize it:
 C-W+
 
 
  Note that the first window will jump back to line 1
 
  Seen on Linux (Mint 17, 64 bit)

 I can reproduce it.


If it's of any help in locating the problem, I am unable to reproduce this
in MacVim (in either its gui, or when using its embedded Vim in the
console).  However, I am able to reproduce it on MacOSX using a clone of
Bram's source repo---but only when the somefile is more than 50 lines
long.

-Manny

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-25 Fir de Conversatie Nobuhiro Takasaki
It is my mistake.
The previous patch was too short.
When I repeat the failure, I lose confidence.
I note further in the future.


Thanks.
Nobuhiro Takasaki

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r 54d96e3b2eec src/window.c
--- a/src/window.c	Thu May 22 21:22:19 2014 +0200
+++ b/src/window.c	Mon May 26 00:09:33 2014 +0900
@@ -5710,8 +5710,9 @@
 		--wp-w_wrow;
 		}
 	}
+set_topline(wp, lnum);
 	}
-	else
+	else if (sline  0)
 	{
 	while (sline  0  lnum  1)
 	{
@@ -5748,14 +5749,15 @@
 		lnum++;
 		wp-w_wrow -= line_size + sline;
 	}
-	else if (sline = 0)
+	else if (sline  0)
 	{
 		/* First line of file reached, use that as topline. */
 		lnum = 1;
 		wp-w_wrow -= sline;
 	}
+
+set_topline(wp, lnum);
 	}
-	set_topline(wp, lnum);
 }
 
 if (wp == curwin)


Re: Buffer position not preserved when resizing window (7.4.307)

2014-05-25 Fir de Conversatie Bram Moolenaar

Nobuhiro Takasaki wrote:

 It is my mistake.
 The previous patch was too short.
 When I repeat the failure, I lose confidence.
 I note further in the future.

Thanks for the quick reply!

Perhaps we should have a test for these fixes.


-- 
hundred-and-one symptoms of being an internet addict:
204. You're being audited because you mailed your tax return to the IRC.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Buffer position not preserved when resizing window (7.4.307)

2014-05-24 Fir de Conversatie Ron Aaron
To repro the issue:

   gvim -u NONE somefile
   :sp
   50G

Now switch to the second window
   C-WW

And resize it:
   C-W+


Note that the first window will jump back to line 1

Seen on Linux (Mint 17, 64 bit)

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.