Commit 163638a8 authored by Karl Heuer's avatar Karl Heuer
Browse files

(column_number_displayed): New variable.

(redisplay, redisplay_window): If that var is set, do mode line.
(display_mode_line): Unset the var.
(decode_mode_spec): Set the var if %c was seen.
parent f40423fa
......@@ -200,6 +200,9 @@ int windows_or_buffers_changed;
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;
......@@ -583,7 +586,7 @@ redisplay ()
frame_garbaged = 0;
}
if (clip_changed || windows_or_buffers_changed)
if (clip_changed || windows_or_buffers_changed || column_number_displayed)
update_mode_lines++;
/* Detect case that we need to write a star in the mode line. */
......@@ -1356,7 +1359,7 @@ redisplay_window (window, just_this_one)
/* 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))
|| INTEGERP (w->base_line_pos) || column_number_displayed)
&& height != XFASTINT (w->height))
display_mode_line (w);
if (! line_number_displayed
......@@ -2717,6 +2720,7 @@ display_mode_line (w)
register FRAME_PTR f = XFRAME (WINDOW_FRAME (w));
line_number_displayed = 0;
column_number_displayed = 0;
get_display_line (f, vpos, left);
display_mode_element (w, vpos, left, 0, right, right,
......@@ -3024,6 +3028,7 @@ decode_mode_spec (w, c, maxwidth)
break;
case 'c':
column_number_displayed = 1;
sprintf (decode_mode_spec_buf, "%d", current_column ());
return decode_mode_spec_buf;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment