emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Thu, 10 Mar 2005 09:55:24 -0500

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.991 emacs/src/xdisp.c:1.992
*** emacs/src/xdisp.c:1.991     Mon Mar  7 21:51:50 2005
--- emacs/src/xdisp.c   Thu Mar 10 14:55:22 2005
***************
*** 1298,1303 ****
--- 1298,1304 ----
    /* Note that we may overshoot because of invisible text.  */
    if (IT_CHARPOS (it) >= charpos)
      {
+       int top_x = it.current_x;
        int top_y = it.current_y;
        int bottom_y = (last_height = 0, line_bottom_y (&it));
        int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
***************
*** 1306,1320 ****
        visible_p = bottom_y > window_top_y;
        else if (top_y < it.last_visible_y)
          visible_p = 1;
!       if (visible_p && x)
        {
!         *x = it.current_x;
          *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
!         if (rtop)
!           {
!             *rtop = max (0, window_top_y - top_y);
!             *rbot = max (0, bottom_y - it.last_visible_y);
!           }
        }
      }
    else
--- 1307,1318 ----
        visible_p = bottom_y > window_top_y;
        else if (top_y < it.last_visible_y)
          visible_p = 1;
!       if (visible_p)
        {
!         *x = top_x;
          *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
!         *rtop = max (0, window_top_y - top_y);
!         *rbot = max (0, bottom_y - it.last_visible_y);
        }
      }
    else
***************
*** 1327,1344 ****
        if (charpos < IT_CHARPOS (it))
        {
          visible_p = 1;
!         if (x)
!           {
!             move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
!             *x = it2.current_x;
!             *y = it2.current_y + it2.max_ascent - it2.ascent;
!             if (rtop)
!               {
!                 *rtop = max (0, -it2.current_y);
!                 *rbot = max (0, ((it2.current_y + it2.max_ascent + 
it2.max_descent)
!                                  - it.last_visible_y));
!               }
!           }
        }
      }
  
--- 1325,1336 ----
        if (charpos < IT_CHARPOS (it))
        {
          visible_p = 1;
!         move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
!         *x = it2.current_x;
!         *y = it2.current_y + it2.max_ascent - it2.ascent;
!         *rtop = max (0, -it2.current_y);
!         *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent)
!                          - it.last_visible_y));
        }
      }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]