mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-19 10:22:27 +00:00
(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.
This commit is contained in:
parent
f40423fa6a
commit
163638a8a9
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user