/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.843.2.19 by miles, Fri Aug 27 07:00:33 2004 UTC revision 1.843.2.20 by miles, Sat Sep 4 09:14:27 2004 UTC
# Line 307  Lisp_Object Qline_height, Qtotal; Line 307  Lisp_Object Qline_height, Qtotal;
307  extern Lisp_Object Qheight;  extern Lisp_Object Qheight;
308  extern Lisp_Object QCwidth, QCheight, QCascent;  extern Lisp_Object QCwidth, QCheight, QCascent;
309  extern Lisp_Object Qscroll_bar;  extern Lisp_Object Qscroll_bar;
310    extern Lisp_Object Qcursor;
311    
312  /* Non-nil means highlight trailing whitespace.  */  /* Non-nil means highlight trailing whitespace.  */
313    
# Line 10747  set_cursor_from_row (w, row, matrix, del Line 10748  set_cursor_from_row (w, row, matrix, del
10748  {  {
10749    struct glyph *glyph = row->glyphs[TEXT_AREA];    struct glyph *glyph = row->glyphs[TEXT_AREA];
10750    struct glyph *end = glyph + row->used[TEXT_AREA];    struct glyph *end = glyph + row->used[TEXT_AREA];
10751      struct glyph *cursor = NULL;
10752    /* The first glyph that starts a sequence of glyphs from string.  */    /* The first glyph that starts a sequence of glyphs from string.  */
10753    struct glyph *string_start;    struct glyph *string_start;
10754    /* The X coordinate of string_start.  */    /* The X coordinate of string_start.  */
# Line 10756  set_cursor_from_row (w, row, matrix, del Line 10758  set_cursor_from_row (w, row, matrix, del
10758    /* The last known character position before string_start.  */    /* The last known character position before string_start.  */
10759    int string_before_pos;    int string_before_pos;
10760    int x = row->x;    int x = row->x;
10761      int cursor_x = x;
10762    int pt_old = PT - delta;    int pt_old = PT - delta;
10763    
10764    /* Skip over glyphs not having an object at the start of the row.    /* Skip over glyphs not having an object at the start of the row.
# Line 10788  set_cursor_from_row (w, row, matrix, del Line 10791  set_cursor_from_row (w, row, matrix, del
10791            string_start = glyph;            string_start = glyph;
10792            string_start_x = x;            string_start_x = x;
10793            /* Skip all glyphs from string.  */            /* Skip all glyphs from string.  */
10794            SKIP_GLYPHS (glyph, end, x, STRINGP (glyph->object));            do
10795                {
10796                  if ((cursor == NULL || glyph > cursor)
10797                      && !NILP (Fget_char_property (make_number ((glyph)->charpos),
10798                                                    Qcursor, (glyph)->object)))
10799                    {
10800                      cursor = glyph;
10801                      cursor_x = x;
10802                    }
10803                  x += glyph->pixel_width;
10804                  ++glyph;
10805                }
10806              while (glyph < end && STRINGP (glyph->object));
10807          }          }
10808      }      }
10809    
10810    if (string_start    if (cursor != NULL)
10811        && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))      {
10812          glyph = cursor;
10813          x = cursor_x;
10814        }
10815      else if (string_start
10816               && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
10817      {      {
10818        /* We may have skipped over point because the previous glyphs        /* We may have skipped over point because the previous glyphs
10819           are from string.  As there's no easy way to know the           are from string.  As there's no easy way to know the
# Line 11185  try_scrolling (window, just_this_one_p, Line 11205  try_scrolling (window, just_this_one_p,
11205            start_display (&it, w, startp);            start_display (&it, w, startp);
11206    
11207            if (scroll_conservatively)            if (scroll_conservatively)
11208              amount_to_scroll =              amount_to_scroll
11209                max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, temp_scroll_step));                = max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, temp_scroll_step));
11210            else if (scroll_step || temp_scroll_step)            else if (scroll_step || temp_scroll_step)
11211              amount_to_scroll = scroll_max;              amount_to_scroll = scroll_max;
11212            else            else
# Line 11465  try_cursor_movement (window, startp, scr Line 11485  try_cursor_movement (window, startp, scr
11485            else if (PT < XFASTINT (w->last_point))            else if (PT < XFASTINT (w->last_point))
11486              {              {
11487                /* Cursor has to be moved backward.  Note that PT >=                /* Cursor has to be moved backward.  Note that PT >=
11488                   CHARPOS (startp) because of the outer                   CHARPOS (startp) because of the outer if-statement.  */
                  if-statement.  */  
11489                while (!row->mode_line_p                while (!row->mode_line_p
11490                       && (MATRIX_ROW_START_CHARPOS (row) > PT                       && (MATRIX_ROW_START_CHARPOS (row) > PT
11491                           || (MATRIX_ROW_START_CHARPOS (row) == PT                           || (MATRIX_ROW_START_CHARPOS (row) == PT
# Line 11978  redisplay_window (window, just_this_one_ Line 11997  redisplay_window (window, just_this_one_
11997               buffer.  */               buffer.  */
11998            || !NILP (Vwindow_scroll_functions)            || !NILP (Vwindow_scroll_functions)
11999            || MINI_WINDOW_P (w)            || MINI_WINDOW_P (w)
12000            || !(used_current_matrix_p =            || !(used_current_matrix_p
12001                 try_window_reusing_current_matrix (w)))                 = try_window_reusing_current_matrix (w)))
12002          {          {
12003            IF_DEBUG (debug_method_add (w, "1"));            IF_DEBUG (debug_method_add (w, "1"));
12004            try_window (window, startp);            try_window (window, startp);
# Line 12108  redisplay_window (window, just_this_one_ Line 12127  redisplay_window (window, just_this_one_
12127        || !NILP (Vwindow_scroll_functions)        || !NILP (Vwindow_scroll_functions)
12128        || !just_this_one_p        || !just_this_one_p
12129        || MINI_WINDOW_P (w)        || MINI_WINDOW_P (w)
12130        || !(used_current_matrix_p =        || !(used_current_matrix_p
12131             try_window_reusing_current_matrix (w)))             = try_window_reusing_current_matrix (w)))
12132      try_window (window, startp);      try_window (window, startp);
12133    
12134    /* If new fonts have been loaded (due to fontsets), give up.  We    /* If new fonts have been loaded (due to fontsets), give up.  We
# Line 15774  display_mode_element (it, depth, field_w Line 15793  display_mode_element (it, depth, field_w
15793     The mode_line_string_face face property is always added to the string.     The mode_line_string_face face property is always added to the string.
15794   */   */
15795    
15796  static int store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props)  static int
15797    store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props)
15798       char *string;       char *string;
15799       Lisp_Object lisp_string;       Lisp_Object lisp_string;
15800       int copy_string;       int copy_string;
# Line 15886  If third optional arg NO-PROPS is non-ni Line 15906  If third optional arg NO-PROPS is non-ni
15906    
15907    if (NILP (format) || EQ (format, Qt))    if (NILP (format) || EQ (format, Qt))
15908      {      {
15909        face_id = NILP (format)        face_id = (NILP (format)
15910          ? CURRENT_MODE_LINE_FACE_ID (w) :                   ? CURRENT_MODE_LINE_FACE_ID (w)
15911          HEADER_LINE_FACE_ID;                   : HEADER_LINE_FACE_ID);
15912        format = NILP (format)        format = (NILP (format)
15913          ? current_buffer->mode_line_format                  ? current_buffer->mode_line_format
15914          : current_buffer->header_line_format;                  : current_buffer->header_line_format);
15915      }      }
15916    
15917    init_iterator (&it, w, -1, -1, NULL, face_id);    init_iterator (&it, w, -1, -1, NULL, face_id);
15918    
15919    if (NILP (no_props))    if (NILP (no_props))
15920      {      {
15921        mode_line_string_face =        mode_line_string_face
15922          (face_id == MODE_LINE_FACE_ID ? Qmode_line :          = (face_id == MODE_LINE_FACE_ID ? Qmode_line
15923           face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive :             : face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive
15924           face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil);             : face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil);
15925    
15926        mode_line_string_face_prop =        mode_line_string_face_prop
15927          NILP (mode_line_string_face) ? Qnil :          = (NILP (mode_line_string_face) ? Qnil
15928          Fcons (Qface, Fcons (mode_line_string_face, Qnil));             : Fcons (Qface, Fcons (mode_line_string_face, Qnil)));
15929    
15930        /* We need a dummy last element in mode_line_string_list to        /* We need a dummy last element in mode_line_string_list to
15931           indicate we are building the propertized mode-line string.           indicate we are building the propertized mode-line string.
15932           Using mode_line_string_face_prop here GC protects it.  */           Using mode_line_string_face_prop here GC protects it.  */
15933        mode_line_string_list =        mode_line_string_list
15934          Fcons (mode_line_string_face_prop, Qnil);          = Fcons (mode_line_string_face_prop, Qnil);
15935        frame_title_ptr = NULL;        frame_title_ptr = NULL;
15936      }      }
15937    else    else
# Line 21038  note_mouse_highlight (f, x, y) Line 21058  note_mouse_highlight (f, x, y)
21058    
21059    if (part == ON_VERTICAL_BORDER)    if (part == ON_VERTICAL_BORDER)
21060      cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;      cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
21061    else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)    else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
21062               || part == ON_SCROLL_BAR)
21063      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
21064    else    else
21065      cursor = FRAME_X_OUTPUT (f)->text_cursor;      cursor = FRAME_X_OUTPUT (f)->text_cursor;

Legend:
Removed from v.1.843.2.19  
changed lines
  Added in v.1.843.2.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26