Mercurial > emacs
changeset 10441:f1fc7b6e5fa4
(redisplay, redisplay_window, display_mode_line, decode_mode_spec): Use window
field column_number_displayed instead of a global flag.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 17 Jan 1995 01:52:22 +0000 |
parents | 055b4219b6d7 |
children | d379e2c60766 |
files | src/xdisp.c |
diffstat | 1 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Tue Jan 17 01:51:57 1995 +0000 +++ b/src/xdisp.c Tue Jan 17 01:52:22 1995 +0000 @@ -205,9 +205,6 @@ and it displayed a line number. */ int line_number_displayed; -/* Nonzero if display_mode_line needs to handle %c. */ -int column_number_displayed; - /* Maximum buffer size for which to display line numbers. */ int line_number_display_limit; @@ -663,7 +660,9 @@ frame_garbaged = 0; } - if (clip_changed || windows_or_buffers_changed || column_number_displayed) + if (clip_changed || windows_or_buffers_changed + || (!NILP (w->column_number_displayed) + && XFASTINT (w->column_number_displayed) != current_column ())) update_mode_lines++; /* Detect case that we need to write a star in the mode line. */ @@ -1446,7 +1445,9 @@ /* If window not full width, must redo its mode line if the window to its side is being redone */ || (!just_this_one && width < FRAME_WIDTH (f) - 1) - || INTEGERP (w->base_line_pos) || column_number_displayed) + || INTEGERP (w->base_line_pos) + || (!NILP (w->column_number_displayed) + && XFASTINT (w->column_number_displayed) != current_column ())) && height != XFASTINT (w->height)) display_mode_line (w); if (! line_number_displayed @@ -2807,7 +2808,7 @@ register FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); line_number_displayed = 0; - column_number_displayed = 0; + w->column_number_displayed = Qnil; get_display_line (f, vpos, left); display_mode_element (w, vpos, left, 0, right, right, @@ -3115,9 +3116,12 @@ break; case 'c': - column_number_displayed = 1; - sprintf (decode_mode_spec_buf, "%d", current_column ()); - return decode_mode_spec_buf; + { + int col = current_column (); + XSETFASTINT (w->column_number_displayed, col); + sprintf (decode_mode_spec_buf, "%d", col); + return decode_mode_spec_buf; + } case 'l': {