comparison src/redisplay.c @ 151:59463afc5666 r20-3b2

Import from CVS: tag r20-3b2
author cvs
date Mon, 13 Aug 2007 09:37:19 +0200
parents 538048ae2ab8
children 6b37e6ddd302
comparison
equal deleted inserted replaced
150:8ebb1c0f0f6f 151:59463afc5666
1908 else 1908 else
1909 data.cursor_type = NO_CURSOR; 1909 data.cursor_type = NO_CURSOR;
1910 } 1910 }
1911 else if (MINI_WINDOW_P (w) && !active_minibuffer) 1911 else if (MINI_WINDOW_P (w) && !active_minibuffer)
1912 data.cursor_type = NO_CURSOR; 1912 data.cursor_type = NO_CURSOR;
1913 else if (w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))) 1913 else if (w == XWINDOW (FRAME_SELECTED_WINDOW (f)) &&
1914 EQ(DEVICE_CONSOLE(d), Vselected_console) &&
1915 d == XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d))))&&
1916 f == XFRAME(DEVICE_SELECTED_FRAME(d)))
1914 { 1917 {
1915 data.bi_cursor_bufpos = BI_BUF_PT (b); 1918 data.bi_cursor_bufpos = BI_BUF_PT (b);
1916 data.cursor_type = CURSOR_ON; 1919 data.cursor_type = CURSOR_ON;
1917 } 1920 }
1918 else if (w == XWINDOW (FRAME_SELECTED_WINDOW (f))) 1921 else if (w == XWINDOW (FRAME_SELECTED_WINDOW (f)))
4929 Lisp_Object old_buffer = w->buffer; 4932 Lisp_Object old_buffer = w->buffer;
4930 struct buffer *b; 4933 struct buffer *b;
4931 int echo_active = 0; 4934 int echo_active = 0;
4932 int startp = 1; 4935 int startp = 1;
4933 int pointm; 4936 int pointm;
4934 int selected; 4937 int selected_in_its_frame;
4938 int selected_globally;
4935 int skip_output = 0; 4939 int skip_output = 0;
4936 int truncation_changed; 4940 int truncation_changed;
4937 int inactive_minibuffer = 4941 int inactive_minibuffer =
4938 (MINI_WINDOW_P (w) && 4942 (MINI_WINDOW_P (w) &&
4939 (f != device_selected_frame (d)) && 4943 (f != device_selected_frame (d)) &&
4956 redisplay_windows (w->hchild, skip_selected); 4960 redisplay_windows (w->hchild, skip_selected);
4957 return; 4961 return;
4958 } 4962 }
4959 4963
4960 /* Is this window the selected window on its frame? */ 4964 /* Is this window the selected window on its frame? */
4961 selected = 4965 selected_in_its_frame = (w == XWINDOW (FRAME_SELECTED_WINDOW (f)));
4962 (w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))); 4966 selected_globally =
4963 if (skip_selected && selected) 4967 selected_in_its_frame &&
4968 EQ(DEVICE_CONSOLE(d), Vselected_console) &&
4969 XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d)))) == d &&
4970 XFRAME(DEVICE_SELECTED_FRAME(d)) == f;
4971 if (skip_selected && selected_in_its_frame)
4964 return; 4972 return;
4965 4973
4966 /* It is possible that the window is not fully initialized yet. */ 4974 /* It is possible that the window is not fully initialized yet. */
4967 if (NILP (w->buffer)) 4975 if (NILP (w->buffer))
4968 return; 4976 return;
4977 4985
4978 if (echo_active) 4986 if (echo_active)
4979 pointm = 1; 4987 pointm = 1;
4980 else 4988 else
4981 { 4989 {
4982 if (selected) 4990 if (selected_globally)
4983 { 4991 {
4984 pointm = BUF_PT (b); 4992 pointm = BUF_PT (b);
4985 } 4993 }
4986 else 4994 else
4987 { 4995 {
5049 5057
5050 if (!point_visible (w, pointm, DESIRED_DISP) && !inactive_minibuffer) 5058 if (!point_visible (w, pointm, DESIRED_DISP) && !inactive_minibuffer)
5051 { 5059 {
5052 pointm = point_at_center (w, DESIRED_DISP, 0, 0); 5060 pointm = point_at_center (w, DESIRED_DISP, 0, 0);
5053 5061
5054 if (selected) 5062 if (selected_globally)
5055 BUF_SET_PT (b, pointm); 5063 BUF_SET_PT (b, pointm);
5056 5064
5057 Fset_marker (w->pointm[DESIRED_DISP], make_int (pointm), 5065 Fset_marker (w->pointm[DESIRED_DISP], make_int (pointm),
5058 old_buffer); 5066 old_buffer);
5059 5067
5077 && !truncation_changed) 5085 && !truncation_changed)
5078 { 5086 {
5079 /* Check if the cursor has actually moved. */ 5087 /* Check if the cursor has actually moved. */
5080 if (EQ (Fmarker_buffer (w->last_point[CURRENT_DISP]), w->buffer) 5088 if (EQ (Fmarker_buffer (w->last_point[CURRENT_DISP]), w->buffer)
5081 && pointm == marker_position (w->last_point[CURRENT_DISP]) 5089 && pointm == marker_position (w->last_point[CURRENT_DISP])
5082 && selected 5090 && selected_globally
5083 && !w->windows_changed 5091 && !w->windows_changed
5084 && !f->clip_changed 5092 && !f->clip_changed
5085 && !f->extents_changed 5093 && !f->extents_changed
5086 && !f->faces_changed 5094 && !f->faces_changed
5087 && !f->point_changed 5095 && !f->point_changed
5117 5125
5118 skip_output = 1; 5126 skip_output = 1;
5119 goto regeneration_done; 5127 goto regeneration_done;
5120 } 5128 }
5121 } 5129 }
5122 else if (!selected && !f->point_changed) 5130 else if (!selected_in_its_frame && !f->point_changed)
5123 { 5131 {
5124 if (f->modeline_changed) 5132 if (f->modeline_changed)
5125 regenerate_modeline (w); 5133 regenerate_modeline (w);
5126 5134
5127 skip_output = 1; 5135 skip_output = 1;
5677 window_line_number (struct window *w, int type) 5685 window_line_number (struct window *w, int type)
5678 { 5686 {
5679 struct device *d = XDEVICE (XFRAME (w->frame)->device); 5687 struct device *d = XDEVICE (XFRAME (w->frame)->device);
5680 struct buffer *b = XBUFFER (w->buffer); 5688 struct buffer *b = XBUFFER (w->buffer);
5681 Bufpos end = 5689 Bufpos end =
5682 ((w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))) 5690 (((w == XWINDOW (FRAME_SELECTED_WINDOW (device_selected_frame (d)))) &&
5691 EQ(DEVICE_CONSOLE(d), Vselected_console) &&
5692 XDEVICE(CONSOLE_SELECTED_DEVICE(XCONSOLE(DEVICE_CONSOLE(d)))) == d &&
5693 EQ(DEVICE_SELECTED_FRAME(d), w->frame))
5683 ? BUF_PT (b) 5694 ? BUF_PT (b)
5684 : marker_position (w->pointm[type])); 5695 : marker_position (w->pointm[type]));
5685 int lots = 999999999; 5696 int lots = 999999999;
5686 int shortage, line; 5697 int shortage, line;
5687 5698