GNU bug report logs - #9415
23.3.50; unerased cursor in a row that extends face to end of line

Previous Next

Package: emacs;

Reported by: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Date: Thu, 1 Sep 2011 00:34:02 UTC

Severity: normal

Found in version 23.3.50

Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Subject: bug#9415: closed (Re: bug#9415: 23.3.50; unerased cursor in a row
 that extends face to end of line)
Date: Sat, 10 Sep 2011 07:05:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#9415: 23.3.50; unerased cursor in a row that extends face to end of line

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 9415 <at> debbugs.gnu.org.

-- 
9415: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9415
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9415-done <at> debbugs.gnu.org
Subject: Re: bug#9415: 23.3.50;
	unerased cursor in a row that extends face to end of line
Date: Sat, 10 Sep 2011 16:00:07 +0900
>>>>> On Thu, 01 Sep 2011 18:39:24 +0300, Eli Zaretskii <eliz <at> gnu.org> said:

>> The patch below seems to fix it, and the cause of the problem is
>> explained in the added comment.

> Looks good to me, thanks.

Thanks.  I've installed the patch to the emacs-23 branch.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp

[Message part 3 (message/rfc822, inline)]
From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3.50; unerased cursor in a row that extends face to end of line
Date: Thu, 01 Sep 2011 09:29:53 +0900
Steps to reproduce:

  1. $ emacs -Q
  2. M-x font-lock-mode RET
  3. M-x blink-cursor-mode RET
  4. C-SPC C-p
  5. M-o o mode-line RET
  6. C-x 3
  7. C-x 1
  8. C-p

Result:

  The cursor at the beginning of the line whose face is mode-line is
  unerased.

The patch below seems to fix it, and the cause of the problem is
explained in the added comment.

=== modified file 'src/xdisp.c'
*** src/xdisp.c	2011-07-23 07:32:42 +0000
--- src/xdisp.c	2011-09-01 00:03:30 +0000
***************
*** 24278,24284 ****
      {
        int yb = window_text_bottom_y (w);
        struct glyph_row *row;
!       int cursor_cleared_p;
        struct glyph_row *first_overlapping_row, *last_overlapping_row;
  
        TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
--- 24278,24284 ----
      {
        int yb = window_text_bottom_y (w);
        struct glyph_row *row;
!       int cursor_cleared_p, phys_cursor_on_p;
        struct glyph_row *first_overlapping_row, *last_overlapping_row;
  
        TRACE ((stderr, "expose_window (%d, %d, %d, %d)\n",
***************
*** 24298,24303 ****
--- 24298,24310 ----
        else
  	cursor_cleared_p = 0;
  
+       /* If the row containing the cursor extends face to end of line,
+ 	 then expose_area might overwrite the cursor outside the
+ 	 rectangle and thus notice_overwritten_cursor might clear
+ 	 w->phys_cursor_on_p.  We remember the original value and
+ 	 check later if it is changed.  */
+       phys_cursor_on_p = w->phys_cursor_on_p;
+ 
        /* Update lines intersecting rectangle R.  */
        first_overlapping_row = last_overlapping_row = NULL;
        for (row = w->current_matrix->rows;
***************
*** 24364,24370 ****
  	  x_draw_vertical_border (w);
  
  	  /* Turn the cursor on again.  */
! 	  if (cursor_cleared_p)
  	    update_window_cursor (w, 1);
  	}
      }
--- 24371,24378 ----
  	  x_draw_vertical_border (w);
  
  	  /* Turn the cursor on again.  */
! 	  if (cursor_cleared_p
! 	      || (phys_cursor_on_p && !w->phys_cursor_on_p))
  	    update_window_cursor (w, 1);
  	}
      }

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/Users/mituharu/src/bzr/emacs/emacs-23/etc/DEBUG.


In GNU Emacs 23.3.50.1 (x86_64-apple-darwin11.0.0, X toolkit)
 of 2011-08-31 on yamamoto-no-iMac.local
Windowing system distributor `The X.Org Foundation', version 11.0.11002000
configured using `configure  '--with-jpeg=no' '--with-gif=no' '--with-tiff=no''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message ecomplete rfc822 mml easymenu mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug japan-util tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process font-render-setting x-toolkit x multi-tty emacs)



This bug report was last modified 13 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.