unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9415: 23.3.50; unerased cursor in a row that extends face to end of line
@ 2011-09-01  0:29 YAMAMOTO Mitsuharu
  2011-09-01 15:39 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2011-09-01  0:29 UTC (permalink / raw)
  To: 9415

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@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)





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9415: 23.3.50; unerased cursor in a row that extends face to end of line
  2011-09-01  0:29 bug#9415: 23.3.50; unerased cursor in a row that extends face to end of line YAMAMOTO Mitsuharu
@ 2011-09-01 15:39 ` Eli Zaretskii
  2011-09-10  7:00   ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2011-09-01 15:39 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 9415

> Date: Thu, 01 Sep 2011 09:29:53 +0900
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> 
> The patch below seems to fix it, and the cause of the problem is
> explained in the added comment.

Looks good to me, thanks.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9415: 23.3.50; unerased cursor in a row that extends face to end of line
  2011-09-01 15:39 ` Eli Zaretskii
@ 2011-09-10  7:00   ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2011-09-10  7:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 9415-done

>>>>> On Thu, 01 Sep 2011 18:39:24 +0300, Eli Zaretskii <eliz@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@math.s.chiba-u.ac.jp





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-10  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-01  0:29 bug#9415: 23.3.50; unerased cursor in a row that extends face to end of line YAMAMOTO Mitsuharu
2011-09-01 15:39 ` Eli Zaretskii
2011-09-10  7:00   ` YAMAMOTO Mitsuharu

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).