aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-02-12 18:36:55 +0200
committerEli Zaretskii2013-02-12 18:36:55 +0200
commit33b49d71e45e3be1db4577277763f1cb3138d225 (patch)
tree2bd1eb9c50213b50801ef0da789796b8deb3b0b5 /src
parentf1f0587100316d5d7f622fb01d73f97e0c060d55 (diff)
downloademacs-33b49d71e45e3be1db4577277763f1cb3138d225.tar.gz
emacs-33b49d71e45e3be1db4577277763f1cb3138d225.zip
Minor additional fix in the wake of bugs #13623 and 13626.
src/xdisp.c (redisplay_internal): Don't set w->region_showing to the marker's position. (display_line): Set w->region_showing to the value of it->region_beg_charpos, not to -1. This fixes redisplay optimization when cursor is moved up after M->. src/window.h (struct window): region_showing can no longer be negative.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/window.h3
-rw-r--r--src/xdisp.c4
3 files changed, 14 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 30470f5730a..fb4cc723646 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
12013-02-12 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
4 marker's position.
5 (display_line): Set w->region_showing to the value of
6 it->region_beg_charpos, not to -1. This fixes redisplay
7 optimization when cursor is moved up after M->. (Bug#13623)
8 (Bug#13626)
9
10 * window.h (struct window): region_showing can no longer be
11 negative.
12
12013-02-11 Paul Eggert <eggert@cs.ucla.edu> 132013-02-11 Paul Eggert <eggert@cs.ucla.edu>
2 14
3 Tune by using memchr and memrchr. 15 Tune by using memchr and memrchr.
diff --git a/src/window.h b/src/window.h
index 0f4f242641e..dcef37abb4c 100644
--- a/src/window.h
+++ b/src/window.h
@@ -338,8 +338,7 @@ struct window
338 int vscroll; 338 int vscroll;
339 339
340 /* If we have highlighted the region (or any part of it), the mark 340 /* If we have highlighted the region (or any part of it), the mark
341 position or -1 (the latter is used by the iterator for internal 341 (region start) position; otherwise zero. */
342 purposes); otherwise zero. */
343 ptrdiff_t region_showing; 342 ptrdiff_t region_showing;
344 343
345 /* Z_BYTE - buffer position of the last glyph in the current matrix of W. 344 /* Z_BYTE - buffer position of the last glyph in the current matrix of W.
diff --git a/src/xdisp.c b/src/xdisp.c
index 463f4f9ef05..ca3f968afa7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13244,8 +13244,6 @@ redisplay_internal (void)
13244 ++clear_image_cache_count; 13244 ++clear_image_cache_count;
13245#endif 13245#endif
13246 13246
13247 w->region_showing = XINT (Fmarker_position (BVAR (XBUFFER (w->buffer), mark)));
13248
13249 /* Build desired matrices, and update the display. If 13247 /* Build desired matrices, and update the display. If
13250 consider_all_windows_p is non-zero, do it for all windows on all 13248 consider_all_windows_p is non-zero, do it for all windows on all
13251 frames. Otherwise do it for selected_window, only. */ 13249 frames. Otherwise do it for selected_window, only. */
@@ -19138,7 +19136,7 @@ display_line (struct it *it)
19138 } 19136 }
19139 19137
19140 /* Is IT->w showing the region? */ 19138 /* Is IT->w showing the region? */
19141 it->w->region_showing = it->region_beg_charpos > 0 ? -1 : 0; 19139 it->w->region_showing = it->region_beg_charpos > 0 ? it->region_beg_charpos : 0;
19142 19140
19143 /* Clear the result glyph row and enable it. */ 19141 /* Clear the result glyph row and enable it. */
19144 prepare_desired_row (row); 19142 prepare_desired_row (row);