aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-10-31 21:50:17 +0000
committerKarl Heuer1994-10-31 21:50:17 +0000
commit163638a8a9c6156dca850d66618cfdd72dc24523 (patch)
tree7d3dbdbf4d48e62535e84b3e7c27743619f4f071 /src
parentf40423fa6a288806af3c7f0b5fca1ba258a5127d (diff)
downloademacs-163638a8a9c6156dca850d66618cfdd72dc24523.tar.gz
emacs-163638a8a9c6156dca850d66618cfdd72dc24523.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 50fc2ae7637..6dc5f1811d5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -200,6 +200,9 @@ int windows_or_buffers_changed;
200 and it displayed a line number. */ 200 and it displayed a line number. */
201int line_number_displayed; 201int line_number_displayed;
202 202
203/* Nonzero if display_mode_line needs to handle %c. */
204int column_number_displayed;
205
203/* Maximum buffer size for which to display line numbers. */ 206/* Maximum buffer size for which to display line numbers. */
204int line_number_display_limit; 207int line_number_display_limit;
205 208
@@ -583,7 +586,7 @@ redisplay ()
583 frame_garbaged = 0; 586 frame_garbaged = 0;
584 } 587 }
585 588
586 if (clip_changed || windows_or_buffers_changed) 589 if (clip_changed || windows_or_buffers_changed || column_number_displayed)
587 update_mode_lines++; 590 update_mode_lines++;
588 591
589 /* Detect case that we need to write a star in the mode line. */ 592 /* Detect case that we need to write a star in the mode line. */
@@ -1356,7 +1359,7 @@ done:
1356 /* If window not full width, must redo its mode line 1359 /* If window not full width, must redo its mode line
1357 if the window to its side is being redone */ 1360 if the window to its side is being redone */
1358 || (!just_this_one && width < FRAME_WIDTH (f) - 1) 1361 || (!just_this_one && width < FRAME_WIDTH (f) - 1)
1359 || INTEGERP (w->base_line_pos)) 1362 || INTEGERP (w->base_line_pos) || column_number_displayed)
1360 && height != XFASTINT (w->height)) 1363 && height != XFASTINT (w->height))
1361 display_mode_line (w); 1364 display_mode_line (w);
1362 if (! line_number_displayed 1365 if (! line_number_displayed
@@ -2717,6 +2720,7 @@ display_mode_line (w)
2717 register FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); 2720 register FRAME_PTR f = XFRAME (WINDOW_FRAME (w));
2718 2721
2719 line_number_displayed = 0; 2722 line_number_displayed = 0;
2723 column_number_displayed = 0;
2720 2724
2721 get_display_line (f, vpos, left); 2725 get_display_line (f, vpos, left);
2722 display_mode_element (w, vpos, left, 0, right, right, 2726 display_mode_element (w, vpos, left, 0, right, right,
@@ -3024,6 +3028,7 @@ decode_mode_spec (w, c, maxwidth)
3024 break; 3028 break;
3025 3029
3026 case 'c': 3030 case 'c':
3031 column_number_displayed = 1;
3027 sprintf (decode_mode_spec_buf, "%d", current_column ()); 3032 sprintf (decode_mode_spec_buf, "%d", current_column ());
3028 return decode_mode_spec_buf; 3033 return decode_mode_spec_buf;
3029 3034