Karsten Hopp 6c9dc0
To: vim-dev@vim.org
Karsten Hopp 6c9dc0
Subject: patch 7.1.056
Karsten Hopp 6c9dc0
Fcc: outbox
Karsten Hopp 6c9dc0
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 6c9dc0
Mime-Version: 1.0
Karsten Hopp 6c9dc0
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 6c9dc0
Content-Transfer-Encoding: 8bit
Karsten Hopp 6c9dc0
------------
Karsten Hopp 6c9dc0
Karsten Hopp 6c9dc0
Patch 7.1.056
Karsten Hopp 6c9dc0
Problem:    More prompt does not behave correctly after scrolling back.
Karsten Hopp 6c9dc0
	    (Randall W. Morris)
Karsten Hopp 6c9dc0
Solution:   Avoid lines_left becomes negative. (Chris Lubinski)  Don't check
Karsten Hopp 6c9dc0
	    mp_last when deciding to show the more prompt. (Martin Toft)
Karsten Hopp 6c9dc0
Files:	    src/message.c
Karsten Hopp 6c9dc0
Karsten Hopp 6c9dc0
Karsten Hopp 6c9dc0
*** ../vim-7.1.055/src/message.c	Sun Aug  5 19:20:04 2007
Karsten Hopp 6c9dc0
--- src/message.c	Tue Aug  7 21:52:10 2007
Karsten Hopp 6c9dc0
***************
Karsten Hopp 6c9dc0
*** 1878,1884 ****
Karsten Hopp 6c9dc0
  		/* output postponed text */
Karsten Hopp 6c9dc0
  		t_puts(&t_col, t_s, s, attr);
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
! 	    /* When no more prompt an no more room, truncate here */
Karsten Hopp 6c9dc0
  	    if (msg_no_more && lines_left == 0)
Karsten Hopp 6c9dc0
  		break;
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
--- 1878,1884 ----
Karsten Hopp 6c9dc0
  		/* output postponed text */
Karsten Hopp 6c9dc0
  		t_puts(&t_col, t_s, s, attr);
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
! 	    /* When no more prompt and no more room, truncate here */
Karsten Hopp 6c9dc0
  	    if (msg_no_more && lines_left == 0)
Karsten Hopp 6c9dc0
  		break;
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
***************
Karsten Hopp 6c9dc0
*** 1927,1933 ****
Karsten Hopp 6c9dc0
  	     * If screen is completely filled and 'more' is set then wait
Karsten Hopp 6c9dc0
  	     * for a character.
Karsten Hopp 6c9dc0
  	     */
Karsten Hopp 6c9dc0
! 	    --lines_left;
Karsten Hopp 6c9dc0
  	    if (p_more && lines_left == 0 && State != HITRETURN
Karsten Hopp 6c9dc0
  					    && !msg_no_more && !exmode_active)
Karsten Hopp 6c9dc0
  	    {
Karsten Hopp 6c9dc0
--- 1927,1934 ----
Karsten Hopp 6c9dc0
  	     * If screen is completely filled and 'more' is set then wait
Karsten Hopp 6c9dc0
  	     * for a character.
Karsten Hopp 6c9dc0
  	     */
Karsten Hopp 6c9dc0
! 	    if (lines_left > 0)
Karsten Hopp 6c9dc0
! 		--lines_left;
Karsten Hopp 6c9dc0
  	    if (p_more && lines_left == 0 && State != HITRETURN
Karsten Hopp 6c9dc0
  					    && !msg_no_more && !exmode_active)
Karsten Hopp 6c9dc0
  	    {
Karsten Hopp 6c9dc0
***************
Karsten Hopp 6c9dc0
*** 2234,2240 ****
Karsten Hopp 6c9dc0
  {
Karsten Hopp 6c9dc0
      msgchunk_T	*mp;
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
!     /* Only show somethign if there is more than one line, otherwise it looks
Karsten Hopp 6c9dc0
       * weird, typing a command without output results in one line. */
Karsten Hopp 6c9dc0
      mp = msg_sb_start(last_msgchunk);
Karsten Hopp 6c9dc0
      if (mp == NULL || mp->sb_prev == NULL)
Karsten Hopp 6c9dc0
--- 2235,2241 ----
Karsten Hopp 6c9dc0
  {
Karsten Hopp 6c9dc0
      msgchunk_T	*mp;
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
!     /* Only show something if there is more than one line, otherwise it looks
Karsten Hopp 6c9dc0
       * weird, typing a command without output results in one line. */
Karsten Hopp 6c9dc0
      mp = msg_sb_start(last_msgchunk);
Karsten Hopp 6c9dc0
      if (mp == NULL || mp->sb_prev == NULL)
Karsten Hopp 6c9dc0
***************
Karsten Hopp 6c9dc0
*** 2622,2628 ****
Karsten Hopp 6c9dc0
  		}
Karsten Hopp 6c9dc0
  	    }
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
! 	    if (scroll < 0 || (scroll == 0 && mp_last != NULL))
Karsten Hopp 6c9dc0
  	    {
Karsten Hopp 6c9dc0
  		/* displayed the requested text, more prompt again */
Karsten Hopp 6c9dc0
  		screen_fill((int)Rows - 1, (int)Rows, 0,
Karsten Hopp 6c9dc0
--- 2623,2629 ----
Karsten Hopp 6c9dc0
  		}
Karsten Hopp 6c9dc0
  	    }
Karsten Hopp 6c9dc0
  
Karsten Hopp 6c9dc0
! 	    if (scroll <= 0)
Karsten Hopp 6c9dc0
  	    {
Karsten Hopp 6c9dc0
  		/* displayed the requested text, more prompt again */
Karsten Hopp 6c9dc0
  		screen_fill((int)Rows - 1, (int)Rows, 0,
Karsten Hopp 6c9dc0
*** ../vim-7.1.055/src/version.c	Mon Aug  6 22:27:13 2007
Karsten Hopp 6c9dc0
--- src/version.c	Tue Aug  7 21:57:02 2007
Karsten Hopp 6c9dc0
***************
Karsten Hopp 6c9dc0
*** 668,669 ****
Karsten Hopp 6c9dc0
--- 668,671 ----
Karsten Hopp 6c9dc0
  {   /* Add new patch number below this line */
Karsten Hopp 6c9dc0
+ /**/
Karsten Hopp 6c9dc0
+     56,
Karsten Hopp 6c9dc0
  /**/
Karsten Hopp 6c9dc0
Karsten Hopp 6c9dc0
-- 
Karsten Hopp 6c9dc0
From "know your smileys":
Karsten Hopp 6c9dc0
 :-| :-|   Deja' vu!
Karsten Hopp 6c9dc0
Karsten Hopp 6c9dc0
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 6c9dc0
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 6c9dc0
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 6c9dc0
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///