unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: "Jan D." <jan.h.d@swipnet.se>, Jason Rumney <jasonr@gnu.org>,
	rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [hober0@gmail.com: Re: mode-line redisplay bug]
Date: Wed, 12 Oct 2005 17:41:18 +0900	[thread overview]
Message-ID: <wlhdbn161d.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <wlll0z1l46.wl%mituharu@math.s.chiba-u.ac.jp>

>>>>> On Wed, 12 Oct 2005 12:15:37 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

> I tried it on Mac, and found that the calculated rectangle on a
> mode-line was not correct when it was displayed with a
> variable-width font.

Sorry for the noise.  If enabled rows except the mode-line in the
current matrix are gathered to the lower indices, the following one
would be better.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

*** xdisp.c.~1.1059.~	Wed Oct 12 09:31:47 2005
--- xdisp.c	Wed Oct 12 14:59:59 2005
***************
*** 2059,2067 ****
    width = WINDOW_FRAME_COLUMN_WIDTH (w);
    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)
      {
        area = TEXT_AREA;
--- 2059,2064 ----
***************
*** 2085,2097 ****
        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)
  	{
--- 2082,2104 ----
        area = TEXT_AREA;
  
      text_glyph:
+       r = MATRIX_HEADER_LINE_ROW (w->current_matrix);
+       end_row = MATRIX_MODE_LINE_ROW (w->current_matrix);
+ 
        gr = 0; gy = 0;
!       for (; r <= end_row; ++r)
! 	{
! 	  if (!r->enabled_p)
! 	    if (end_row->enabled_p)
! 	      r = end_row;
! 	    else
! 	      break;
! 	  if (r->y + r->height > y)
! 	    {
! 	      gr = r; gy = r->y;
! 	      break;
! 	    }
! 	}
  
        if (gr && gy <= y)
  	{
***************
*** 2148,2155 ****
        width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
  
      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;
--- 2155,2165 ----
        width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
  
      row_glyph:
+       r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
+       end_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
+ 
        gr = 0, gy = 0;
!       for (; r <= end_row && r->enabled_p; ++r)
  	if (r->y + r->height > y)
  	  {
  	    gr = r; gy = r->y;

  parent reply	other threads:[~2005-10-12  8:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 14:59 [hober0@gmail.com: Re: mode-line redisplay bug] Richard M. Stallman
2005-08-12 16:58 ` Eli Zaretskii
2005-08-12 17:19   ` Edward O'Connor
2005-08-12 17:31     ` Edward O'Connor
2005-08-12 18:58     ` Henrik Enberg
2005-08-16 12:58       ` Kim F. Storm
2005-08-12 18:19 ` Robert J. Chassell
2005-08-12 22:56 ` Jason Rumney
2005-08-13 21:54   ` Richard M. Stallman
2005-08-13 22:51   ` Jason Rumney
2005-10-08 21:26   ` Jason Rumney
2005-10-09  1:57     ` mituharu
2005-10-09  6:11     ` Jan D.
2005-10-10 19:40       ` Jason Rumney
     [not found]         ` <wlwtp6ijoz.wl%mituharu@math.s.chiba-u.ac.jp>
2005-10-11  1:21           ` YAMAMOTO Mitsuharu
2005-10-11 10:21             ` Kim F. Storm
2005-10-11 12:38               ` YAMAMOTO Mitsuharu
2005-10-11 15:14                 ` Kim F. Storm
2005-10-11 14:50               ` Jason Rumney
2005-10-11 22:43                 ` Kim F. Storm
2005-10-12  3:15                   ` YAMAMOTO Mitsuharu
2005-10-12  8:39                     ` Kim F. Storm
2005-10-12  8:41                     ` YAMAMOTO Mitsuharu [this message]
2005-10-12  9:29                       ` Kim F. Storm
2005-10-12  9:59                         ` YAMAMOTO Mitsuharu
2005-10-11 10:47             ` Jason Rumney
2005-10-11 11:25               ` Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlhdbn161d.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    --cc=jasonr@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).