emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Re: mode-line redisplay bug]


From: YAMAMOTO Mitsuharu
Subject: Re: address@hidden: Re: mode-line redisplay bug]
Date: Wed, 12 Oct 2005 18:59:43 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 12 Oct 2005 11:29:57 +0200, address@hidden (Kim F. Storm) said:

> I don't quite remember, but most often, all rows above the modeline
> are enabled, so I doubt it makes a big difference in practice.

> Your previous code made fewer assumptions, and was still correct, so
> I think I like that one better.

> BTW, how does your code work for a window without a modeline
> (mode-line-format = nil)?

I installed yet another one, which does not change the original code
so much, but just directly obtains header-line/mode-line rows.  So it
should work like the original one for no mode-line case.

                                     YAMAMOTO Mitsuharu
                                address@hidden

Index: src/xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1059
diff -c -r1.1059 xdisp.c
*** src/xdisp.c 11 Oct 2005 22:36:46 -0000      1.1059
--- src/xdisp.c 12 Oct 2005 09:40:14 -0000
***************
*** 2060,2066 ****
    height = WINDOW_FRAME_LINE_HEIGHT (w);
  
    r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
!   end_row = r + w->current_matrix->nrows - 1;
  
    if (w->pseudo_window_p)
      {
--- 2060,2066 ----
    height = WINDOW_FRAME_LINE_HEIGHT (w);
  
    r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
!   end_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
  
    if (w->pseudo_window_p)
      {
***************
*** 2079,2098 ****
        area = RIGHT_MARGIN_AREA;
        goto text_glyph;
  
-     case ON_TEXT:
-     case ON_MODE_LINE:
      case ON_HEADER_LINE:
        area = TEXT_AREA;
  
      text_glyph:
        gr = 0; gy = 0;
!       for (; r < end_row && r->enabled_p; ++r)
        if (r->y + r->height > y)
          {
            gr = r; gy = r->y;
            break;
          }
  
        if (gr && gy <= y)
        {
          struct glyph *g = gr->glyphs[area];
--- 2079,2106 ----
        area = RIGHT_MARGIN_AREA;
        goto text_glyph;
  
      case ON_HEADER_LINE:
+     case ON_MODE_LINE:
+       gr = (part == ON_HEADER_LINE
+           ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
+           : MATRIX_MODE_LINE_ROW (w->current_matrix));
+       gy = gr->y;
+       area = TEXT_AREA;
+       goto text_glyph_row_found;
+ 
+     case ON_TEXT:
        area = TEXT_AREA;
  
      text_glyph:
        gr = 0; gy = 0;
!       for (; r <= end_row && r->enabled_p; ++r)
        if (r->y + r->height > y)
          {
            gr = r; gy = r->y;
            break;
          }
  
+     text_glyph_row_found:
        if (gr && gy <= y)
        {
          struct glyph *g = gr->glyphs[area];
***************
*** 2149,2155 ****
  
      row_glyph:
        gr = 0, gy = 0;
!       for (; r < end_row && r->enabled_p; ++r)
        if (r->y + r->height > y)
          {
            gr = r; gy = r->y;
--- 2157,2163 ----
  
      row_glyph:
        gr = 0, gy = 0;
!       for (; r <= end_row && r->enabled_p; ++r)
        if (r->y + r->height > y)
          {
            gr = r; gy = r->y;




reply via email to

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