[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111673: Fix bugs #13623 and 13626 ca
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111673: Fix bugs #13623 and 13626 caused by changes in revision 111647. |
Date: |
Mon, 04 Feb 2013 17:39:55 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111673
fixes bugs: http://debbugs.gnu.org/13623 http://debbugs.gnu.org/13626
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2013-02-04 17:39:55 +0200
message:
Fix bugs #13623 and 13626 caused by changes in revision 111647.
src/xdisp.c (window_buffer_changed): region_showing can be negative,
which still means region is being displayed.
(redisplay_internal): Resurrect code that forced redisplay of the
whole window when showing region and the mark has changed. Record
the new mark position to allow redisplay optimizations.
(display_line): If it->region_beg_charpos is non-zero, set the
window's region_showing member to -1.
src/window.h (struct window) <region_showing>: Declare ptrdiff_t,
not bitfield of 1 bit.
modified:
src/ChangeLog
src/window.h
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-02-03 16:45:37 +0000
+++ b/src/ChangeLog 2013-02-04 15:39:55 +0000
@@ -1,3 +1,16 @@
+2013-02-04 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (window_buffer_changed): region_showing can be negative,
+ which still means region is being displayed.
+ (redisplay_internal): Resurrect code that forced redisplay of the
+ whole window when showing region and the mark has changed. Record
+ the new mark position to allow redisplay optimizations.
+ (display_line): If it->region_beg_charpos is non-zero, set the
+ window's region_showing member to -1. (Bug#13623) (Bug#13626)
+
+ * window.h (struct window) <region_showing>: Declare ptrdiff_t,
+ not bitfield of 1 bit.
+
2013-02-03 Daniel Colascione <address@hidden>
* emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that
=== modified file 'src/window.h'
--- a/src/window.h 2013-02-01 07:23:18 +0000
+++ b/src/window.h 2013-02-04 15:39:55 +0000
@@ -333,13 +333,15 @@
the frame image that window_end_pos did not get onto the frame. */
unsigned window_end_valid : 1;
- /* Nonzero if we have highlighted the region (or any part of it). */
- unsigned region_showing : 1;
-
/* Amount by which lines of this window are scrolled in
y-direction (smooth scrolling). */
int vscroll;
+ /* If we have highlighted the region (or any part of it), the mark
+ position or -1 (the latter is used by the iterator for internal
+ purposes); otherwise zero. */
+ ptrdiff_t region_showing;
+
/* Z_BYTE - buffer position of the last glyph in the current matrix of W.
Should be nonnegative, and only valid if window_end_valid is nonzero.
*/
ptrdiff_t window_end_bytepos;
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-02-01 07:23:18 +0000
+++ b/src/xdisp.c 2013-02-04 15:39:55 +0000
@@ -10753,7 +10753,7 @@
return (((BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) != w->last_had_star)
|| ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (b, mark_active)))
- != w->region_showing));
+ != (w->region_showing != 0)));
}
/* Nonzero if W has %c in its mode line and mode line should be updated. */
@@ -13016,6 +13016,17 @@
clear_garbaged_frames ();
}
+ /* If showing the region, and mark has changed, we must redisplay
+ the whole window. The assignment to this_line_start_pos prevents
+ the optimization directly below this if-statement. */
+ if (((!NILP (Vtransient_mark_mode)
+ && !NILP (BVAR (XBUFFER (w->buffer), mark_active)))
+ != (w->region_showing > 0))
+ || (w->region_showing
+ && w->region_showing
+ != XINT (Fmarker_position (BVAR (XBUFFER (w->buffer), mark)))))
+ CHARPOS (this_line_start_pos) = 0;
+
/* Optimize the case that only the line containing the cursor in the
selected window has changed. Variables starting with this_ are
set in display_line and record information about the line
@@ -13228,6 +13239,8 @@
++clear_image_cache_count;
#endif
+ w->region_showing = XINT (Fmarker_position (BVAR (XBUFFER (w->buffer),
mark)));
+
/* Build desired matrices, and update the display. If
consider_all_windows_p is non-zero, do it for all windows on all
frames. Otherwise do it for selected_window, only. */
@@ -19120,7 +19133,7 @@
}
/* Is IT->w showing the region? */
- it->w->region_showing = it->region_beg_charpos > 0;
+ it->w->region_showing = it->region_beg_charpos > 0 ? -1 : 0;
/* Clear the result glyph row and enable it. */
prepare_desired_row (row);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111673: Fix bugs #13623 and 13626 caused by changes in revision 111647.,
Eli Zaretskii <=