diff options
| author | Karl Heuer | 1995-01-17 01:52:22 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-01-17 01:52:22 +0000 |
| commit | 155ef550fb02a15a4de1ea6d013c40adf3858b51 (patch) | |
| tree | 1afc7c324089b938b8353d0590d5e67ac086ccdd /src | |
| parent | 1262267aa86f72ec8e6c1aa841ff87981f27d080 (diff) | |
| download | emacs-155ef550fb02a15a4de1ea6d013c40adf3858b51.tar.gz emacs-155ef550fb02a15a4de1ea6d013c40adf3858b51.zip | |
(redisplay, redisplay_window, display_mode_line, decode_mode_spec): Use window
field column_number_displayed instead of a global flag.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4bfd37c9a3b..bb34e27e456 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -205,9 +205,6 @@ int windows_or_buffers_changed; | |||
| 205 | and it displayed a line number. */ | 205 | and it displayed a line number. */ |
| 206 | int line_number_displayed; | 206 | int line_number_displayed; |
| 207 | 207 | ||
| 208 | /* Nonzero if display_mode_line needs to handle %c. */ | ||
| 209 | int column_number_displayed; | ||
| 210 | |||
| 211 | /* Maximum buffer size for which to display line numbers. */ | 208 | /* Maximum buffer size for which to display line numbers. */ |
| 212 | int line_number_display_limit; | 209 | int line_number_display_limit; |
| 213 | 210 | ||
| @@ -663,7 +660,9 @@ redisplay () | |||
| 663 | frame_garbaged = 0; | 660 | frame_garbaged = 0; |
| 664 | } | 661 | } |
| 665 | 662 | ||
| 666 | if (clip_changed || windows_or_buffers_changed || column_number_displayed) | 663 | if (clip_changed || windows_or_buffers_changed |
| 664 | || (!NILP (w->column_number_displayed) | ||
| 665 | && XFASTINT (w->column_number_displayed) != current_column ())) | ||
| 667 | update_mode_lines++; | 666 | update_mode_lines++; |
| 668 | 667 | ||
| 669 | /* Detect case that we need to write a star in the mode line. */ | 668 | /* Detect case that we need to write a star in the mode line. */ |
| @@ -1446,7 +1445,9 @@ done: | |||
| 1446 | /* If window not full width, must redo its mode line | 1445 | /* If window not full width, must redo its mode line |
| 1447 | if the window to its side is being redone */ | 1446 | if the window to its side is being redone */ |
| 1448 | || (!just_this_one && width < FRAME_WIDTH (f) - 1) | 1447 | || (!just_this_one && width < FRAME_WIDTH (f) - 1) |
| 1449 | || INTEGERP (w->base_line_pos) || column_number_displayed) | 1448 | || INTEGERP (w->base_line_pos) |
| 1449 | || (!NILP (w->column_number_displayed) | ||
| 1450 | && XFASTINT (w->column_number_displayed) != current_column ())) | ||
| 1450 | && height != XFASTINT (w->height)) | 1451 | && height != XFASTINT (w->height)) |
| 1451 | display_mode_line (w); | 1452 | display_mode_line (w); |
| 1452 | if (! line_number_displayed | 1453 | if (! line_number_displayed |
| @@ -2807,7 +2808,7 @@ display_mode_line (w) | |||
| 2807 | register FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); | 2808 | register FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); |
| 2808 | 2809 | ||
| 2809 | line_number_displayed = 0; | 2810 | line_number_displayed = 0; |
| 2810 | column_number_displayed = 0; | 2811 | w->column_number_displayed = Qnil; |
| 2811 | 2812 | ||
| 2812 | get_display_line (f, vpos, left); | 2813 | get_display_line (f, vpos, left); |
| 2813 | display_mode_element (w, vpos, left, 0, right, right, | 2814 | display_mode_element (w, vpos, left, 0, right, right, |
| @@ -3115,9 +3116,12 @@ decode_mode_spec (w, c, maxwidth) | |||
| 3115 | break; | 3116 | break; |
| 3116 | 3117 | ||
| 3117 | case 'c': | 3118 | case 'c': |
| 3118 | column_number_displayed = 1; | 3119 | { |
| 3119 | sprintf (decode_mode_spec_buf, "%d", current_column ()); | 3120 | int col = current_column (); |
| 3120 | return decode_mode_spec_buf; | 3121 | XSETFASTINT (w->column_number_displayed, col); |
| 3122 | sprintf (decode_mode_spec_buf, "%d", col); | ||
| 3123 | return decode_mode_spec_buf; | ||
| 3124 | } | ||
| 3121 | 3125 | ||
| 3122 | case 'l': | 3126 | case 'l': |
| 3123 | { | 3127 | { |