From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Image display problems in Gnus Date: Thu, 14 Sep 2006 12:56:13 +0200 Message-ID: References: <85hczbj1a3.fsf@lola.goethe.zz> <45081CE2.6070707@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158231589 25057 80.91.229.2 (14 Sep 2006 10:59:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2006 10:59:49 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 14 12:59:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNowT-0003D5-El for ged-emacs-devel@m.gmane.org; Thu, 14 Sep 2006 12:59:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNowS-00089B-V9 for ged-emacs-devel@m.gmane.org; Thu, 14 Sep 2006 06:59:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNovm-0007ov-Bk for emacs-devel@gnu.org; Thu, 14 Sep 2006 06:58:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNovj-0007mJ-1R for emacs-devel@gnu.org; Thu, 14 Sep 2006 06:58:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNovi-0007mE-Sz for emacs-devel@gnu.org; Thu, 14 Sep 2006 06:58:50 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNowA-0002SO-0J; Thu, 14 Sep 2006 06:59:18 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 06278FAC03C; Thu, 14 Sep 2006 12:57:15 +0200 (CEST) Original-To: Jason Rumney In-Reply-To: <45081CE2.6070707@gnu.org> (Jason Rumney's message of "Wed\, 13 Sep 2006 15\:59\:46 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59829 Archived-At: Jason Rumney writes: > Kim F. Storm wrote: >> This causese problems for the redisplay engine when it tries to figure >> out where to display the cursor -- and it ends up displaying it at >> some position which is not visible in the window. >> >> This triggers the recenting code in redisplay which wants the cursor >> position to be displayed in the window. But this still results in >> the cursor in some invalid position.... >> >> .. and finally, the redisplay has some code which catches this >> anomaly and displays the cursor in the upper left corner of the window >> instead. >> > Where is the code that catches this? I have been trying to investigate > a Windows specific bug listed in FOR-RELEASE the last couple of days, > where the same seems to be happening with the splash screen image, > except Emacs never catches it and it keeps looping. I can see that on > X, Emacs catches it as you explain there. I don't think it is X specific. I'm not 100% sure, but I think it is this code in xdisp.c: /* Consider the following case: Window starts at BEGV, there is invisible, intangible text at BEGV, so that display starts at some point START > BEGV. It can happen that we are called with PT somewhere between BEGV and START. Try to handle that case. */ if (w->cursor.vpos < 0) { struct glyph_row *row = w->current_matrix->rows; if (row->mode_line_p) ++row; set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); } It just seems to be triggered by some other special case where displaying an image at the end of the window causes the cursor to be placed "outside the window". -- Kim F. Storm http://www.cua.dk