From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11484: 23.4; Scrolling leaves traces of old text behind Date: Mon, 22 Oct 2012 19:29:30 +0200 Message-ID: <83hapmct51.fsf@gnu.org> References: <8F188F07-37AF-4F32-A989-CDC844CE1B4F@swipnet.se> <83wqyjd2et.fsf@gnu.org> <8CEDD0A3-E7A8-40B1-9893-699FD3658E88@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1350927031 26575 80.91.229.3 (22 Oct 2012 17:30:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2012 17:30:31 +0000 (UTC) Cc: 11484@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 22 19:30:38 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TQLpl-0000j1-5B for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Oct 2012 19:30:37 +0200 Original-Received: from localhost ([::1]:36705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQLpc-00020K-Ag for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Oct 2012 13:30:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQLpU-0001zx-09 for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 13:30:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQLpQ-0006kE-OJ for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 13:30:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQLpQ-0006jd-LV for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 13:30:16 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TQLr8-0000eX-5p for bug-gnu-emacs@gnu.org; Mon, 22 Oct 2012 13:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Oct 2012 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11484 X-GNU-PR-Package: emacs,ns X-GNU-PR-Keywords: Original-Received: via spool by 11484-submit@debbugs.gnu.org id=B11484.13509270922450 (code B ref 11484); Mon, 22 Oct 2012 17:32:02 +0000 Original-Received: (at 11484) by debbugs.gnu.org; 22 Oct 2012 17:31:32 +0000 Original-Received: from localhost ([127.0.0.1]:56167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQLqd-0000dR-S3 for submit@debbugs.gnu.org; Mon, 22 Oct 2012 13:31:32 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:47659) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQLqb-0000d4-5x for 11484@debbugs.gnu.org; Mon, 22 Oct 2012 13:31:30 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MCB00I001Q24700@a-mtaout20.012.net.il> for 11484@debbugs.gnu.org; Mon, 22 Oct 2012 19:29:35 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MCB00HBQ1XA61I0@a-mtaout20.012.net.il>; Mon, 22 Oct 2012 19:29:35 +0200 (IST) In-reply-to: <8CEDD0A3-E7A8-40B1-9893-699FD3658E88@swipnet.se> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65857 Archived-At: > From: Jan Dj=E4rv > Date: Mon, 22 Oct 2012 07:07:33 +0200 > Cc: 11484@debbugs.gnu.org >=20 > In the file helix.pqr, there are columns of A:s followed by space. = When scrolling fast (or sometimes just going to the end of the buffe= r), the A:s are replaced with Y:s. But the spacees following the A:s= are not redrawn. I assume the display engine correctly assumes that= from a character view they have not changed and need not be redrawn.= But that extra pixel in A:s lower right corner is in the box for th= e space. Redrawing the whole line in this case would also redraw the= space. >=20 > That isn't a very good solution now that I think about it, as it wo= uld require a redraw of the whole line just to draw the cursor. A mo= re efficient way would be to include the previous unchanged character= and the following unchanged character when redrawing a block of chan= ged characters. You may wish taking a look at dispnew.c:update_text_area. This function is called for every glyph row (=3D screen line) we may need = to redraw, and it tries to minimize the parts of the line that are actually redrawn. I would first try disabling this optimization, forcing the function to always redraw each line, as it normally does under the following conditions: /* If rows are at different X or Y, or rows have different height, or the current row is marked invalid, write the entire line. */ if (!current_row->enabled_p || desired_row->y !=3D current_row->y || desired_row->ascent !=3D current_row->ascent || desired_row->phys_ascent !=3D current_row->phys_ascent || desired_row->phys_height !=3D current_row->phys_height || desired_row->visible_height !=3D current_row->visible_height || current_row->overlapped_p /* This next line is necessary for correctly redrawing =09 mouse-face areas after scrolling and other operations. =09 However, it causes excessive flickering when mouse is moved =09 across the mode line. Luckily, turning it off for the mode =09 line doesn't seem to hurt anything. -- cyd. But it is still needed for the header line. -- kfs. */ || (current_row->mouse_face_p =09 && !(current_row->mode_line_p && vpos > 0)) || current_row->x !=3D desired_row->x) { rif->cursor_to (vpos, 0, desired_row->y, desired_row->x); if (desired_row->used[TEXT_AREA]) =09rif->write_glyphs (desired_row->glyphs[TEXT_AREA], =09=09=09 desired_row->used[TEXT_AREA]); If this indeed shows you are on the right track, try changing the 'else' branch of this 'if' so that it redraws a larger part of the line, as needed in this case. There's already some logic there towards this end, which has to do with glyph overlaps, so maybe just = a small change to that will fix this case. Or maybe NS needs some change in xdisp.c:x_get_glyph_overhangs, which is what update_text_area calls to determine whether a glyph overlaps its neighbor. HTH