unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz@gnu.org>
Cc: David Reitter <david.reitter@gmail.com>, emacs-devel@gnu.org
Subject: Re: Truncating scroll runs that copy to where we copied to
Date: Tue, 22 Nov 2011 16:26:41 +0900	[thread overview]
Message-ID: <wlpqgksjm6.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <E1RSjTJ-0007yO-Hd@fencepost.gnu.org> <wlty5ztgeg.wl%mituharu@math.s.chiba-u.ac.jp>

>>>>> On Tue, 22 Nov 2011 01:04:45 -0500, Eli Zaretskii <eliz@gnu.org> said:

> You can help if you explain in more detail what is wrong with the
> current code.  That is what I need to assess the correctness of the
> patch.  I hoped that Yamamoto-san would do that.  Failing that, I'll
> need to figure it out myself, which will take more time, and thus
> will have to wait a couple of days until I have that time to sit
> down and look into this.  I do intend to do that, make no mistake.

Actually, I told what was wrong with the current code in my first
post:

>>>>> On Sun, 20 Nov 2011 16:13:59 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

> I think that `scrolling_window' needs to truncate scroll runs that
> copy to where we copied to; otherwise, `assign_row (to, from)'
> assigns a previously disabled bogus row in the desired matrix when
> we have an overlap in the copy destination.

	/* Assign matrix rows.  */
	for (j = 0; j < r->nrows; ++j)
	  {
	    struct glyph_row *from, *to;
	    int to_overlapped_p;

	    to = MATRIX_ROW (current_matrix, r->desired_vpos + j);
	    from = MATRIX_ROW (desired_matrix, r->desired_vpos + j);
	    to_overlapped_p = to->overlapped_p;
	    from->redraw_fringe_bitmaps_p = from->fringe_bitmap_periodic_p;
	    assign_row (to, from);
	    to->enabled_p = 1, from->enabled_p = 0;
	    to->overlapped_p = to_overlapped_p;
	  }

If there's an overlap (I don't mean the variable to_overlapped_p) in
the copy destinations of two runs, then `from' row in the desired
matrix becomes a bogus one that had been in the current matrix after
processing the first run (because assign_row actually does swap), and
that row is disabled by `from->enabled_p = 0'.  So, when processing
the second run, the `from' row is now the previously disabled bogus
row and it is assigned to a row in the current matrix.

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



  parent reply	other threads:[~2011-11-22  7:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20  7:13 Truncating scroll runs that copy to where we copied to YAMAMOTO Mitsuharu
2011-11-20 18:23 ` Eli Zaretskii
2011-11-21  0:19   ` YAMAMOTO Mitsuharu
2011-11-21 23:50     ` David Reitter
2011-11-22  6:04       ` Eli Zaretskii
2011-11-22  6:22         ` YAMAMOTO Mitsuharu
2011-11-22  8:25           ` Eli Zaretskii
2011-11-22  8:47             ` YAMAMOTO Mitsuharu
2011-11-22  7:26         ` YAMAMOTO Mitsuharu [this message]
2011-11-22  8:52           ` Eli Zaretskii
2011-11-22  9:09             ` YAMAMOTO Mitsuharu
2011-11-22  9:54               ` Eli Zaretskii
2011-11-23  0:41                 ` YAMAMOTO Mitsuharu
2011-11-26 12:44                   ` Eli Zaretskii
2011-11-28  1:10                     ` YAMAMOTO Mitsuharu
2011-11-22  0:33 ` YAMAMOTO Mitsuharu

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=wlpqgksjm6.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=david.reitter@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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).