[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106827: Fix bug #10464 with mouse hi
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106827: Fix bug #10464 with mouse highlight of display strings. |
Date: |
Mon, 09 Jan 2012 22:45:49 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106827
fixes bug(s): http://debbugs.gnu.org/10464
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2012-01-09 22:45:49 +0200
message:
Fix bug #10464 with mouse highlight of display strings.
src/xdisp.c (rows_from_pos_range): Accept additional argument
DISP_STRING, and accept any glyph in a row whose object is that
string as eligible for mouse highlight. Fixes mouse highlight of
display strings from overlays.
modified:
src/ChangeLog
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-01-07 19:51:13 +0000
+++ b/src/ChangeLog 2012-01-09 20:45:49 +0000
@@ -1,3 +1,10 @@
+2012-01-09 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (rows_from_pos_range): Accept additional argument
+ DISP_STRING, and accept any glyph in a row whose object is that
+ string as eligible for mouse highlight. Fixes mouse highlight of
+ display strings from overlays. (Bug#10464)
+
2012-01-07 Paul Eggert <address@hidden>
emacs: fix an auto-save permissions race condition (Bug#10400)
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2012-01-05 09:46:05 +0000
+++ b/src/xdisp.c 2012-01-09 20:45:49 +0000
@@ -25817,12 +25817,14 @@
/* Find the glyph rows START_ROW and END_ROW of window W that display
characters between buffer positions START_CHARPOS and END_CHARPOS
- (excluding END_CHARPOS). This is similar to row_containing_pos,
- but is more accurate when bidi reordering makes buffer positions
- change non-linearly with glyph rows. */
+ (excluding END_CHARPOS). DISP_STRING is a display string that
+ covers these buffer positions. This is similar to
+ row_containing_pos, but is more accurate when bidi reordering makes
+ buffer positions change non-linearly with glyph rows. */
static void
rows_from_pos_range (struct window *w,
EMACS_INT start_charpos, EMACS_INT end_charpos,
+ Lisp_Object disp_string,
struct glyph_row **start, struct glyph_row **end)
{
struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
@@ -25874,8 +25876,11 @@
while (g < e)
{
- if ((BUFFERP (g->object) || INTEGERP (g->object))
- && start_charpos <= g->charpos && g->charpos < end_charpos)
+ if (((BUFFERP (g->object) || INTEGERP (g->object))
+ && start_charpos <= g->charpos && g->charpos < end_charpos)
+ /* A glyph that comes from DISP_STRING is by
+ definition to be highlighted. */
+ || EQ (g->object, disp_string))
*start = row;
g++;
}
@@ -25924,8 +25929,11 @@
while (g < e)
{
- if ((BUFFERP (g->object) || INTEGERP (g->object))
- && start_charpos <= g->charpos && g->charpos < end_charpos)
+ if (((BUFFERP (g->object) || INTEGERP (g->object))
+ && start_charpos <= g->charpos && g->charpos < end_charpos)
+ /* A glyph that comes from DISP_STRING is by
+ definition to be highlighted. */
+ || EQ (g->object, disp_string))
break;
g++;
}
@@ -25969,7 +25977,7 @@
xassert (NILP (after_string) || STRINGP (after_string));
/* Find the rows corresponding to START_CHARPOS and END_CHARPOS. */
- rows_from_pos_range (w, start_charpos, end_charpos, &r1, &r2);
+ rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2);
if (r1 == NULL)
r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
/* If the before-string or display-string contains newlines,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106827: Fix bug #10464 with mouse highlight of display strings.,
Eli Zaretskii <=