[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108138: Fix bug #12403 with garbl
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108138: Fix bug #12403 with garbled display under non-zero scroll-margin. |
Date: |
Wed, 12 Sep 2012 20:12:10 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108138
fixes bug: http://debbugs.gnu.org/12403
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-09-12 20:12:10 +0300
message:
Fix bug #12403 with garbled display under non-zero scroll-margin.
src/xdisp.c (try_window_reusing_current_matrix): Under bidi
reordering, locate the cursor by calling set_cursor_from_row; if
that fails, clear the desired glyph matrix before returning a
failure indication to the caller. Fixes leaving garbled display
when fast scrolling with a down-key when scroll-margin is non-zero.
modified:
src/ChangeLog
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-09-12 14:59:56 +0000
+++ b/src/ChangeLog 2012-09-12 17:12:10 +0000
@@ -1,3 +1,11 @@
+2012-09-12 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (try_window_reusing_current_matrix): Under bidi
+ reordering, locate the cursor by calling set_cursor_from_row; if
+ that fails, clear the desired glyph matrix before returning a
+ failure indication to the caller. Fixes leaving garbled display
+ when fast scrolling with a down-key. (Bug#12403)
+
2012-09-12 Jan Djärv <address@hidden>
* gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2012-05-30 18:09:17 +0000
+++ b/src/xdisp.c 2012-09-12 17:12:10 +0000
@@ -16593,28 +16593,33 @@
}
if (row < bottom_row)
{
- struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
- struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
-
- /* Can't use this optimization with bidi-reordered glyph
- rows, unless cursor is already at point. */
+ /* Can't simply scan the row for point with
+ bidi-reordered glyph rows. Let set_cursor_from_row
+ figure out where to put the cursor, and if it fails,
+ give up. */
if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)))
{
- if (!(w->cursor.hpos >= 0
- && w->cursor.hpos < row->used[TEXT_AREA]
- && BUFFERP (glyph->object)
- && glyph->charpos == PT))
- return 0;
+ if (!set_cursor_from_row (w, row, w->current_matrix,
+ 0, 0, 0, 0))
+ {
+ clear_glyph_matrix (w->desired_matrix);
+ return 0;
+ }
}
else
- for (; glyph < end
- && (!BUFFERP (glyph->object)
- || glyph->charpos < PT);
- glyph++)
- {
- w->cursor.hpos++;
- w->cursor.x += glyph->pixel_width;
- }
+ {
+ struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
+ struct glyph *end = row->glyphs[TEXT_AREA] +
row->used[TEXT_AREA];
+
+ for (; glyph < end
+ && (!BUFFERP (glyph->object)
+ || glyph->charpos < PT);
+ glyph++)
+ {
+ w->cursor.hpos++;
+ w->cursor.x += glyph->pixel_width;
+ }
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108138: Fix bug #12403 with garbled display under non-zero scroll-margin.,
Eli Zaretskii <=