[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 41518e5: Update frame title when scrolling the sele
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 41518e5: Update frame title when scrolling the selected window |
Date: |
Sat, 24 Oct 2015 15:43:12 +0000 |
branch: master
commit 41518e5b6354cf6aa946de2e5b02b728f7b15b8c
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Update frame title when scrolling the selected window
* src/window.c (wset_update_mode_line): New function, sets either the
window's update_mode_line flag or the global update_mode_lines
variable.
(Fset_window_start, set_window_buffer, window_scroll_pixel_based)
(window_scroll_line_based): Call it instead of only setting the
window's update_mode_line flag.
---
src/window.c | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/window.c b/src/window.c
index a8605ee..7c95ff9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -205,6 +205,20 @@ wset_combination (struct window *w, bool horflag,
Lisp_Object val)
w->horizontal = horflag;
}
+static void
+wset_update_mode_line (struct window *w)
+{
+ /* If this window is the selected window on its frame, set the
+ global variable update_mode_lines, so that x_consider_frame_title
+ will consider this frame's title for rtedisplay. */
+ Lisp_Object fselected_window = XFRAME (WINDOW_FRAME (w))->selected_window;
+
+ if (WINDOWP (fselected_window) && XWINDOW (fselected_window) == w)
+ update_mode_lines = 42;
+ else
+ w->update_mode_line = true;
+}
+
/* True if leaf window W doesn't reflect the actual state
of displayed buffer due to its text or overlays change. */
@@ -1666,7 +1680,7 @@ overriding motion of point in order to display at this
exact start. */)
w->start_at_line_beg = false;
if (NILP (noforce))
w->force_start = true;
- w->update_mode_line = true;
+ wset_update_mode_line (w);
/* Bug#15957. */
w->window_end_valid = false;
wset_redisplay (w);
@@ -3271,14 +3285,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object
buffer,
/* Maybe we could move this into the `if' but it's not obviously safe and
I doubt it's worth the trouble. */
wset_redisplay (w);
- /* If this window is the selected window on its frame, set the
- global variable update_mode_lines, so that x_consider_frame_title
- will consider this frame's title for rtedisplay. */
- Lisp_Object fselected_window = XFRAME (WINDOW_FRAME (w))->selected_window;
- if (WINDOWP (fselected_window) && XWINDOW (fselected_window) == w)
- update_mode_lines = 42;
- else
- w->update_mode_line = true;
+
+ wset_update_mode_line (w);
/* We must select BUFFER to run the window-scroll-functions and to look up
the buffer-local value of Vwindow_point_insertion_type. */
@@ -4829,7 +4837,7 @@ window_scroll_pixel_based (Lisp_Object window, int n,
bool whole, bool noerror)
set_marker_restricted (w->start, make_number (spos),
w->contents);
w->start_at_line_beg = true;
- w->update_mode_line = true;
+ wset_update_mode_line (w);
/* Set force_start so that redisplay_window will run the
window-scroll-functions. */
w->force_start = true;
@@ -4977,7 +4985,7 @@ window_scroll_pixel_based (Lisp_Object window, int n,
bool whole, bool noerror)
IT_BYTEPOS (it));
bytepos = marker_byte_position (w->start);
w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n');
- w->update_mode_line = true;
+ wset_update_mode_line (w);
/* Set force_start so that redisplay_window will run the
window-scroll-functions. */
w->force_start = true;
@@ -5211,7 +5219,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool
whole, bool noerror)
set_marker_restricted_both (w->start, w->contents, pos, pos_byte);
w->start_at_line_beg = !NILP (bolp);
- w->update_mode_line = true;
+ wset_update_mode_line (w);
/* Set force_start so that redisplay_window will run
the window-scroll-functions. */
w->force_start = true;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 41518e5: Update frame title when scrolling the selected window,
Eli Zaretskii <=