diff options
| author | Richard M. Stallman | 1997-08-07 08:30:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-07 08:30:47 +0000 |
| commit | d45de95b21f3743e36915f4d58f6cef0f54c1c38 (patch) | |
| tree | 31c99839c39380dfab5e3b55f5fc61e024f774c4 /src | |
| parent | 729b30aeb3e39b7b8feae29751dff545e431401a (diff) | |
| download | emacs-d45de95b21f3743e36915f4d58f6cef0f54c1c38.tar.gz emacs-d45de95b21f3743e36915f4d58f6cef0f54c1c38.zip | |
(COERCE_MARKER): New macro.
(redisplay_internal): Coerce Voverlay_arrow_position to a number
to record it in last_arrow_position.
(mark_window_display_accurate, redisplay_window): Likewise.
(redisplay_window): Don't do the "only point has change" optimization
if the overlay arrow is in this buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 8e274406b83..047fb9a73f3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -114,6 +114,11 @@ Lisp_Object Voverlay_arrow_position; | |||
| 114 | /* String to display for the arrow. */ | 114 | /* String to display for the arrow. */ |
| 115 | Lisp_Object Voverlay_arrow_string; | 115 | Lisp_Object Voverlay_arrow_string; |
| 116 | 116 | ||
| 117 | /* Values of those variables at last redisplay. | ||
| 118 | However, if Voverlay_arrow_position is a marker, | ||
| 119 | last_arrow_position is its numerical position. */ | ||
| 120 | static Lisp_Object last_arrow_position, last_arrow_string; | ||
| 121 | |||
| 117 | /* Like mode-line-format, but for the titlebar on a visible frame. */ | 122 | /* Like mode-line-format, but for the titlebar on a visible frame. */ |
| 118 | Lisp_Object Vframe_title_format; | 123 | Lisp_Object Vframe_title_format; |
| 119 | 124 | ||
| @@ -125,9 +130,6 @@ Lisp_Object Vicon_title_format; | |||
| 125 | have changed. */ | 130 | have changed. */ |
| 126 | static Lisp_Object Vwindow_size_change_functions; | 131 | static Lisp_Object Vwindow_size_change_functions; |
| 127 | 132 | ||
| 128 | /* Values of those variables at last redisplay. */ | ||
| 129 | static Lisp_Object last_arrow_position, last_arrow_string; | ||
| 130 | |||
| 131 | Lisp_Object Qmenu_bar_update_hook; | 133 | Lisp_Object Qmenu_bar_update_hook; |
| 132 | 134 | ||
| 133 | /* Nonzero if overlay arrow has been displayed once in this window. */ | 135 | /* Nonzero if overlay arrow has been displayed once in this window. */ |
| @@ -247,6 +249,9 @@ static int line_number_display_limit; | |||
| 247 | /* Number of lines to keep in the message log buffer. | 249 | /* Number of lines to keep in the message log buffer. |
| 248 | t means infinite. nil means don't log at all. */ | 250 | t means infinite. nil means don't log at all. */ |
| 249 | Lisp_Object Vmessage_log_max; | 251 | Lisp_Object Vmessage_log_max; |
| 252 | |||
| 253 | #define COERCE_MARKER(X) \ | ||
| 254 | (MARKERP ((X)) ? make_number (marker_position (X)) : (X)) | ||
| 250 | 255 | ||
| 251 | /* Output a newline in the *Messages* buffer if "needs" one. */ | 256 | /* Output a newline in the *Messages* buffer if "needs" one. */ |
| 252 | 257 | ||
| @@ -953,7 +958,7 @@ redisplay_internal (preserve_echo_area) | |||
| 953 | 958 | ||
| 954 | /* If specs for an arrow have changed, do thorough redisplay | 959 | /* If specs for an arrow have changed, do thorough redisplay |
| 955 | to ensure we remove any arrow that should no longer exist. */ | 960 | to ensure we remove any arrow that should no longer exist. */ |
| 956 | if (! EQ (Voverlay_arrow_position, last_arrow_position) | 961 | if (! EQ (COERCE_MARKER (Voverlay_arrow_position), last_arrow_position) |
| 957 | || ! EQ (Voverlay_arrow_string, last_arrow_string)) | 962 | || ! EQ (Voverlay_arrow_string, last_arrow_string)) |
| 958 | all_windows = 1; | 963 | all_windows = 1; |
| 959 | 964 | ||
| @@ -1296,7 +1301,7 @@ update: | |||
| 1296 | : Qnil); | 1301 | : Qnil); |
| 1297 | 1302 | ||
| 1298 | w->window_end_valid = w->buffer; | 1303 | w->window_end_valid = w->buffer; |
| 1299 | last_arrow_position = Voverlay_arrow_position; | 1304 | last_arrow_position = COERCE_MARKER (Voverlay_arrow_position); |
| 1300 | last_arrow_string = Voverlay_arrow_string; | 1305 | last_arrow_string = Voverlay_arrow_string; |
| 1301 | if (do_verify_charstarts) | 1306 | if (do_verify_charstarts) |
| 1302 | verify_charstarts (w); | 1307 | verify_charstarts (w); |
| @@ -1417,7 +1422,7 @@ mark_window_display_accurate (window, flag) | |||
| 1417 | 1422 | ||
| 1418 | if (flag) | 1423 | if (flag) |
| 1419 | { | 1424 | { |
| 1420 | last_arrow_position = Voverlay_arrow_position; | 1425 | last_arrow_position = COERCE_MARKER (Voverlay_arrow_position); |
| 1421 | last_arrow_string = Voverlay_arrow_string; | 1426 | last_arrow_string = Voverlay_arrow_string; |
| 1422 | } | 1427 | } |
| 1423 | else | 1428 | else |
| @@ -1829,7 +1834,8 @@ redisplay_window (window, just_this_one, preserve_echo_area) | |||
| 1829 | /* If end pos is out of date, scroll bar and percentage will be wrong */ | 1834 | /* If end pos is out of date, scroll bar and percentage will be wrong */ |
| 1830 | && INTEGERP (w->window_end_vpos) | 1835 | && INTEGERP (w->window_end_vpos) |
| 1831 | && XFASTINT (w->window_end_vpos) < XFASTINT (w->height) | 1836 | && XFASTINT (w->window_end_vpos) < XFASTINT (w->height) |
| 1832 | && !EQ (window, minibuf_window)) | 1837 | && !EQ (window, minibuf_window) |
| 1838 | && current_buffer != XMARKER (Voverlay_arrow_position)->buffer) | ||
| 1833 | { | 1839 | { |
| 1834 | int this_scroll_margin = scroll_margin; | 1840 | int this_scroll_margin = scroll_margin; |
| 1835 | int last_point_y = w->last_point_y - XINT (w->top); | 1841 | int last_point_y = w->last_point_y - XINT (w->top); |
| @@ -1923,7 +1929,7 @@ redisplay_window (window, just_this_one, preserve_echo_area) | |||
| 1923 | doesn't display as the end of a line. */ | 1929 | doesn't display as the end of a line. */ |
| 1924 | && !(dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, '\n'))) | 1930 | && !(dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, '\n'))) |
| 1925 | && NILP (w->region_showing) | 1931 | && NILP (w->region_showing) |
| 1926 | && EQ (last_arrow_position, Voverlay_arrow_position) | 1932 | && EQ (last_arrow_position, COERCE_MARKER (Voverlay_arrow_position)) |
| 1927 | && EQ (last_arrow_string, Voverlay_arrow_string) | 1933 | && EQ (last_arrow_string, Voverlay_arrow_string) |
| 1928 | && (tem = try_window_id (FRAME_SELECTED_WINDOW (f))) | 1934 | && (tem = try_window_id (FRAME_SELECTED_WINDOW (f))) |
| 1929 | && tem != -2) | 1935 | && tem != -2) |