From b2d0c91afda345844c6e4b647b1b0fd6faac6875 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 22 Jul 2011 20:42:43 +0300 Subject: [PATCH] Fix bug #9149 with mouse highlight of empty lines. src/xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object is an integer, which is important for empty lines. --- src/ChangeLog | 5 +++++ src/xdisp.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 65cd07df0ae..0b06e5bf2c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-07-22 Eli Zaretskii + + * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object + is an integer, which is important for empty lines. (Bug#9149) + 2011-07-22 Chong Yidong * frame.c (Fmodify_frame_parameters): In tty case, update the diff --git a/src/xdisp.c b/src/xdisp.c index 72a246ca0c3..905a7ecbf8f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25029,7 +25029,7 @@ rows_from_pos_range (struct window *w, while (g < e) { - if (BUFFERP (g->object) + if ((BUFFERP (g->object) || INTEGERP (g->object)) && start_charpos <= g->charpos && g->charpos < end_charpos) *start = row; g++; @@ -25079,7 +25079,7 @@ rows_from_pos_range (struct window *w, while (g < e) { - if (BUFFERP (g->object) + if ((BUFFERP (g->object) || INTEGERP (g->object)) && start_charpos <= g->charpos && g->charpos < end_charpos) break; g++; -- 2.39.5