Karsten Hopp 3a4722
To: vim_dev@googlegroups.com
Karsten Hopp 3a4722
Subject: Patch 7.4.550
Karsten Hopp 3a4722
Fcc: outbox
Karsten Hopp 3a4722
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 3a4722
Mime-Version: 1.0
Karsten Hopp 3a4722
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 3a4722
Content-Transfer-Encoding: 8bit
Karsten Hopp 3a4722
------------
Karsten Hopp 3a4722
Karsten Hopp 3a4722
Patch 7.4.550
Karsten Hopp 3a4722
Problem:    curs_rows() function is always called with the second argument
Karsten Hopp 3a4722
            false.
Karsten Hopp 3a4722
Solution:   Remove the argument. (Christian Brabandt)
Karsten Hopp 3a4722
            validate_botline_win() can then also be removed.
Karsten Hopp 3a4722
Files:      src/move.c
Karsten Hopp 3a4722
Karsten Hopp 3a4722
Karsten Hopp 3a4722
*** ../vim-7.4.549/src/move.c	2014-09-23 18:37:52.422823701 +0200
Karsten Hopp 3a4722
--- src/move.c	2014-12-13 20:54:33.687102446 +0100
Karsten Hopp 3a4722
***************
Karsten Hopp 3a4722
*** 23,30 ****
Karsten Hopp 3a4722
  static void redraw_for_cursorline __ARGS((win_T *wp));
Karsten Hopp 3a4722
  static int scrolljump_value __ARGS((void));
Karsten Hopp 3a4722
  static int check_top_offset __ARGS((void));
Karsten Hopp 3a4722
! static void curs_rows __ARGS((win_T *wp, int do_botline));
Karsten Hopp 3a4722
! static void validate_botline_win __ARGS((win_T *wp));
Karsten Hopp 3a4722
  static void validate_cheight __ARGS((void));
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
  typedef struct
Karsten Hopp 3a4722
--- 23,29 ----
Karsten Hopp 3a4722
  static void redraw_for_cursorline __ARGS((win_T *wp));
Karsten Hopp 3a4722
  static int scrolljump_value __ARGS((void));
Karsten Hopp 3a4722
  static int check_top_offset __ARGS((void));
Karsten Hopp 3a4722
! static void curs_rows __ARGS((win_T *wp));
Karsten Hopp 3a4722
  static void validate_cheight __ARGS((void));
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
  typedef struct
Karsten Hopp 3a4722
***************
Karsten Hopp 3a4722
*** 609,625 ****
Karsten Hopp 3a4722
  }
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
  /*
Karsten Hopp 3a4722
-  * Make sure the value of wp->w_botline is valid.
Karsten Hopp 3a4722
-  */
Karsten Hopp 3a4722
-     static void
Karsten Hopp 3a4722
- validate_botline_win(wp)
Karsten Hopp 3a4722
-     win_T	*wp;
Karsten Hopp 3a4722
- {
Karsten Hopp 3a4722
-     if (!(wp->w_valid & VALID_BOTLINE))
Karsten Hopp 3a4722
- 	comp_botline(wp);
Karsten Hopp 3a4722
- }
Karsten Hopp 3a4722
- 
Karsten Hopp 3a4722
- /*
Karsten Hopp 3a4722
   * Mark curwin->w_botline as invalid (because of some change in the buffer).
Karsten Hopp 3a4722
   */
Karsten Hopp 3a4722
      void
Karsten Hopp 3a4722
--- 608,613 ----
Karsten Hopp 3a4722
***************
Karsten Hopp 3a4722
*** 678,697 ****
Karsten Hopp 3a4722
      update_topline();
Karsten Hopp 3a4722
      check_cursor_moved(curwin);
Karsten Hopp 3a4722
      if (!(curwin->w_valid & VALID_CROW))
Karsten Hopp 3a4722
! 	curs_rows(curwin, FALSE);
Karsten Hopp 3a4722
  }
Karsten Hopp 3a4722
  #endif
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
  /*
Karsten Hopp 3a4722
   * Compute wp->w_cline_row and wp->w_cline_height, based on the current value
Karsten Hopp 3a4722
   * of wp->w_topline.
Karsten Hopp 3a4722
-  *
Karsten Hopp 3a4722
-  * Returns OK when cursor is in the window, FAIL when it isn't.
Karsten Hopp 3a4722
   */
Karsten Hopp 3a4722
      static void
Karsten Hopp 3a4722
! curs_rows(wp, do_botline)
Karsten Hopp 3a4722
      win_T	*wp;
Karsten Hopp 3a4722
-     int		do_botline;		/* also compute w_botline */
Karsten Hopp 3a4722
  {
Karsten Hopp 3a4722
      linenr_T	lnum;
Karsten Hopp 3a4722
      int		i;
Karsten Hopp 3a4722
--- 666,682 ----
Karsten Hopp 3a4722
      update_topline();
Karsten Hopp 3a4722
      check_cursor_moved(curwin);
Karsten Hopp 3a4722
      if (!(curwin->w_valid & VALID_CROW))
Karsten Hopp 3a4722
! 	curs_rows(curwin);
Karsten Hopp 3a4722
  }
Karsten Hopp 3a4722
  #endif
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
  /*
Karsten Hopp 3a4722
   * Compute wp->w_cline_row and wp->w_cline_height, based on the current value
Karsten Hopp 3a4722
   * of wp->w_topline.
Karsten Hopp 3a4722
   */
Karsten Hopp 3a4722
      static void
Karsten Hopp 3a4722
! curs_rows(wp)
Karsten Hopp 3a4722
      win_T	*wp;
Karsten Hopp 3a4722
  {
Karsten Hopp 3a4722
      linenr_T	lnum;
Karsten Hopp 3a4722
      int		i;
Karsten Hopp 3a4722
***************
Karsten Hopp 3a4722
*** 810,818 ****
Karsten Hopp 3a4722
      redraw_for_cursorline(curwin);
Karsten Hopp 3a4722
      wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
-     /* validate botline too, if update_screen doesn't do it */
Karsten Hopp 3a4722
-     if (do_botline && all_invalid)
Karsten Hopp 3a4722
- 	validate_botline_win(wp);
Karsten Hopp 3a4722
  }
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
  /*
Karsten Hopp 3a4722
--- 795,800 ----
Karsten Hopp 3a4722
***************
Karsten Hopp 3a4722
*** 986,992 ****
Karsten Hopp 3a4722
       * Next make sure that w_cline_row is valid.
Karsten Hopp 3a4722
       */
Karsten Hopp 3a4722
      if (!(curwin->w_valid & VALID_CROW))
Karsten Hopp 3a4722
! 	curs_rows(curwin, FALSE);
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
      /*
Karsten Hopp 3a4722
       * Compute the number of virtual columns.
Karsten Hopp 3a4722
--- 968,974 ----
Karsten Hopp 3a4722
       * Next make sure that w_cline_row is valid.
Karsten Hopp 3a4722
       */
Karsten Hopp 3a4722
      if (!(curwin->w_valid & VALID_CROW))
Karsten Hopp 3a4722
! 	curs_rows(curwin);
Karsten Hopp 3a4722
  
Karsten Hopp 3a4722
      /*
Karsten Hopp 3a4722
       * Compute the number of virtual columns.
Karsten Hopp 3a4722
*** ../vim-7.4.549/src/version.c	2014-12-13 21:00:52.059036480 +0100
Karsten Hopp 3a4722
--- src/version.c	2014-12-13 21:04:26.080739460 +0100
Karsten Hopp 3a4722
***************
Karsten Hopp 3a4722
*** 743,744 ****
Karsten Hopp 3a4722
--- 743,746 ----
Karsten Hopp 3a4722
  {   /* Add new patch number below this line */
Karsten Hopp 3a4722
+ /**/
Karsten Hopp 3a4722
+     550,
Karsten Hopp 3a4722
  /**/
Karsten Hopp 3a4722
Karsten Hopp 3a4722
-- 
Karsten Hopp 3a4722
For humans, honesty is a matter of degree.  Engineers are always honest in
Karsten Hopp 3a4722
matters of technology and human relationships.  That's why it's a good idea
Karsten Hopp 3a4722
to keep engineers away from customers, romantic interests, and other people
Karsten Hopp 3a4722
who can't handle the truth.
Karsten Hopp 3a4722
				(Scott Adams - The Dilbert principle)
Karsten Hopp 3a4722
Karsten Hopp 3a4722
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 3a4722
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 3a4722
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 3a4722
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///