diff options
| author | Richard M. Stallman | 1997-08-16 02:06:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-16 02:06:18 +0000 |
| commit | 377dbd97a8a095513ed9759c49814d63cdb018ab (patch) | |
| tree | 4f6a9bcfa5583c0e065f71a7c0145957603778e0 | |
| parent | 21998786bd2a4e6d895bbea47859201152adccad (diff) | |
| download | emacs-377dbd97a8a095513ed9759c49814d63cdb018ab.tar.gz emacs-377dbd97a8a095513ed9759c49814d63cdb018ab.zip | |
(COERCE_MARKER): Use Fmarker_position instead of
marker_position so that it works with a marker that points nowhere.
(redisplay_window): Check that Voverlay_arrow_position is a
marker before accessing it as such.
| -rw-r--r-- | src/xdisp.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index b2e605b34af..c52919cc70e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -251,7 +251,7 @@ static int line_number_display_limit; | |||
| 251 | Lisp_Object Vmessage_log_max; | 251 | Lisp_Object Vmessage_log_max; |
| 252 | 252 | ||
| 253 | #define COERCE_MARKER(X) \ | 253 | #define COERCE_MARKER(X) \ |
| 254 | (MARKERP ((X)) ? make_number (marker_position (X)) : (X)) | 254 | (MARKERP ((X)) ? Fmarker_position (X) : (X)) |
| 255 | 255 | ||
| 256 | /* Output a newline in the *Messages* buffer if "needs" one. */ | 256 | /* Output a newline in the *Messages* buffer if "needs" one. */ |
| 257 | 257 | ||
| @@ -1835,13 +1835,14 @@ redisplay_window (window, just_this_one, preserve_echo_area) | |||
| 1835 | && INTEGERP (w->window_end_vpos) | 1835 | && INTEGERP (w->window_end_vpos) |
| 1836 | && XFASTINT (w->window_end_vpos) < XFASTINT (w->height) | 1836 | && XFASTINT (w->window_end_vpos) < XFASTINT (w->height) |
| 1837 | && !EQ (window, minibuf_window) | 1837 | && !EQ (window, minibuf_window) |
| 1838 | && current_buffer != XMARKER (Voverlay_arrow_position)->buffer) | 1838 | && (!MARKERP (Voverlay_arrow_position) |
| 1839 | || current_buffer != XMARKER (Voverlay_arrow_position)->buffer)) | ||
| 1839 | { | 1840 | { |
| 1841 | /* All positions in this clause are relative to the window edge. */ | ||
| 1842 | |||
| 1840 | int this_scroll_margin = scroll_margin; | 1843 | int this_scroll_margin = scroll_margin; |
| 1841 | int last_point_y = XFASTINT (w->last_point_y) - XINT (w->top); | 1844 | int last_point_y = XFASTINT (w->last_point_y) - XINT (w->top); |
| 1842 | int last_point_x = (XFASTINT (w->last_point_x) | 1845 | int last_point_x = (XFASTINT (w->last_point_x) - WINDOW_LEFT_MARGIN (w)); |
| 1843 | + (hscroll ? 1 - hscroll : 0) | ||
| 1844 | - WINDOW_LEFT_MARGIN (w)); | ||
| 1845 | 1846 | ||
| 1846 | /* Find where PT is located now on the frame. */ | 1847 | /* Find where PT is located now on the frame. */ |
| 1847 | /* Check just_this_one as a way of verifying that the | 1848 | /* Check just_this_one as a way of verifying that the |
| @@ -2915,7 +2916,6 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done) | |||
| 2915 | XSETFASTINT (default_invis_vector[2], '.'); | 2916 | XSETFASTINT (default_invis_vector[2], '.'); |
| 2916 | default_invis_vector[0] = default_invis_vector[1] = default_invis_vector[2]; | 2917 | default_invis_vector[0] = default_invis_vector[1] = default_invis_vector[2]; |
| 2917 | 2918 | ||
| 2918 | hpos += WINDOW_LEFT_MARGIN (w); | ||
| 2919 | get_display_line (f, vpos, WINDOW_LEFT_MARGIN (w)); | 2919 | get_display_line (f, vpos, WINDOW_LEFT_MARGIN (w)); |
| 2920 | if (tab_width <= 0 || tab_width > 1000) tab_width = 8; | 2920 | if (tab_width <= 0 || tab_width > 1000) tab_width = 8; |
| 2921 | 2921 | ||
| @@ -2951,7 +2951,8 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done) | |||
| 2951 | 2951 | ||
| 2952 | minibuf_prompt_width | 2952 | minibuf_prompt_width |
| 2953 | = (display_string (w, vpos, XSTRING (minibuf_prompt)->data, | 2953 | = (display_string (w, vpos, XSTRING (minibuf_prompt)->data, |
| 2954 | XSTRING (minibuf_prompt)->size, hpos, | 2954 | XSTRING (minibuf_prompt)->size, |
| 2955 | hpos + WINDOW_LEFT_MARGIN (w), | ||
| 2955 | /* Display a space if we truncate. */ | 2956 | /* Display a space if we truncate. */ |
| 2956 | ' ', | 2957 | ' ', |
| 2957 | 1, -1, | 2958 | 1, -1, |
| @@ -2960,7 +2961,7 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done) | |||
| 2960 | on the first line. */ | 2961 | on the first line. */ |
| 2961 | (XFASTINT (w->width) > 10 | 2962 | (XFASTINT (w->width) > 10 |
| 2962 | ? XFASTINT (w->width) - 4 : -1)) | 2963 | ? XFASTINT (w->width) - 4 : -1)) |
| 2963 | - hpos); | 2964 | - hpos - WINDOW_LEFT_MARGIN (w)); |
| 2964 | hpos += minibuf_prompt_width; | 2965 | hpos += minibuf_prompt_width; |
| 2965 | taboffset -= minibuf_prompt_width - old_width; | 2966 | taboffset -= minibuf_prompt_width - old_width; |
| 2966 | } | 2967 | } |
| @@ -3002,6 +3003,8 @@ display_text_line (w, start, vpos, hpos, taboffset, ovstr_done) | |||
| 3002 | } | 3003 | } |
| 3003 | } | 3004 | } |
| 3004 | 3005 | ||
| 3006 | hpos += WINDOW_LEFT_MARGIN (w); | ||
| 3007 | |||
| 3005 | desired_glyphs->bufp[vpos] = start; | 3008 | desired_glyphs->bufp[vpos] = start; |
| 3006 | p1 = desired_glyphs->glyphs[vpos] + hpos; | 3009 | p1 = desired_glyphs->glyphs[vpos] + hpos; |
| 3007 | p1start = p1; | 3010 | p1start = p1; |