emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c [emacs-unicode-2]
Date: Sat, 04 Sep 2004 05:36:27 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.843.2.19 emacs/src/xdisp.c:1.843.2.20
*** emacs/src/xdisp.c:1.843.2.19        Fri Aug 27 07:00:33 2004
--- emacs/src/xdisp.c   Sat Sep  4 09:14:27 2004
***************
*** 307,312 ****
--- 307,313 ----
  extern Lisp_Object Qheight;
  extern Lisp_Object QCwidth, QCheight, QCascent;
  extern Lisp_Object Qscroll_bar;
+ extern Lisp_Object Qcursor;
  
  /* Non-nil means highlight trailing whitespace.  */
  
***************
*** 10747,10752 ****
--- 10748,10754 ----
  {
    struct glyph *glyph = row->glyphs[TEXT_AREA];
    struct glyph *end = glyph + row->used[TEXT_AREA];
+   struct glyph *cursor = NULL;
    /* The first glyph that starts a sequence of glyphs from string.  */
    struct glyph *string_start;
    /* The X coordinate of string_start.  */
***************
*** 10756,10761 ****
--- 10758,10764 ----
    /* The last known character position before string_start.  */
    int string_before_pos;
    int x = row->x;
+   int cursor_x = x;
    int pt_old = PT - delta;
  
    /* Skip over glyphs not having an object at the start of the row.
***************
*** 10788,10799 ****
          string_start = glyph;
          string_start_x = x;
          /* Skip all glyphs from string.  */
!         SKIP_GLYPHS (glyph, end, x, STRINGP (glyph->object));
        }
      }
  
!   if (string_start
!       && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
      {
        /* We may have skipped over point because the previous glyphs
         are from string.  As there's no easy way to know the
--- 10791,10819 ----
          string_start = glyph;
          string_start_x = x;
          /* Skip all glyphs from string.  */
!         do
!           {
!             if ((cursor == NULL || glyph > cursor)
!                 && !NILP (Fget_char_property (make_number ((glyph)->charpos),
!                                               Qcursor, (glyph)->object)))
!               {
!                 cursor = glyph;
!                 cursor_x = x;
!               }
!             x += glyph->pixel_width;
!             ++glyph;
!           }
!         while (glyph < end && STRINGP (glyph->object));
        }
      }
  
!   if (cursor != NULL)
!     {
!       glyph = cursor;
!       x = cursor_x;
!     }
!   else if (string_start
!          && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
      {
        /* We may have skipped over point because the previous glyphs
         are from string.  As there's no easy way to know the
***************
*** 11185,11192 ****
          start_display (&it, w, startp);
  
          if (scroll_conservatively)
!           amount_to_scroll =
!             max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, 
temp_scroll_step));
          else if (scroll_step || temp_scroll_step)
            amount_to_scroll = scroll_max;
          else
--- 11205,11212 ----
          start_display (&it, w, startp);
  
          if (scroll_conservatively)
!           amount_to_scroll
!             = max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, 
temp_scroll_step));
          else if (scroll_step || temp_scroll_step)
            amount_to_scroll = scroll_max;
          else
***************
*** 11465,11472 ****
          else if (PT < XFASTINT (w->last_point))
            {
              /* Cursor has to be moved backward.  Note that PT >=
!                CHARPOS (startp) because of the outer
!                if-statement.  */
              while (!row->mode_line_p
                     && (MATRIX_ROW_START_CHARPOS (row) > PT
                         || (MATRIX_ROW_START_CHARPOS (row) == PT
--- 11485,11491 ----
          else if (PT < XFASTINT (w->last_point))
            {
              /* Cursor has to be moved backward.  Note that PT >=
!                CHARPOS (startp) because of the outer if-statement.  */
              while (!row->mode_line_p
                     && (MATRIX_ROW_START_CHARPOS (row) > PT
                         || (MATRIX_ROW_START_CHARPOS (row) == PT
***************
*** 11978,11985 ****
             buffer.  */
          || !NILP (Vwindow_scroll_functions)
          || MINI_WINDOW_P (w)
!         || !(used_current_matrix_p =
!              try_window_reusing_current_matrix (w)))
        {
          IF_DEBUG (debug_method_add (w, "1"));
          try_window (window, startp);
--- 11997,12004 ----
             buffer.  */
          || !NILP (Vwindow_scroll_functions)
          || MINI_WINDOW_P (w)
!         || !(used_current_matrix_p
!              = try_window_reusing_current_matrix (w)))
        {
          IF_DEBUG (debug_method_add (w, "1"));
          try_window (window, startp);
***************
*** 12108,12115 ****
        || !NILP (Vwindow_scroll_functions)
        || !just_this_one_p
        || MINI_WINDOW_P (w)
!       || !(used_current_matrix_p =
!          try_window_reusing_current_matrix (w)))
      try_window (window, startp);
  
    /* If new fonts have been loaded (due to fontsets), give up.  We
--- 12127,12134 ----
        || !NILP (Vwindow_scroll_functions)
        || !just_this_one_p
        || MINI_WINDOW_P (w)
!       || !(used_current_matrix_p
!          = try_window_reusing_current_matrix (w)))
      try_window (window, startp);
  
    /* If new fonts have been loaded (due to fontsets), give up.  We
***************
*** 15774,15780 ****
     The mode_line_string_face face property is always added to the string.
   */
  
! static int store_mode_line_string (string, lisp_string, copy_string, 
field_width, precision, props)
       char *string;
       Lisp_Object lisp_string;
       int copy_string;
--- 15793,15800 ----
     The mode_line_string_face face property is always added to the string.
   */
  
! static int
! store_mode_line_string (string, lisp_string, copy_string, field_width, 
precision, props)
       char *string;
       Lisp_Object lisp_string;
       int copy_string;
***************
*** 15886,15917 ****
  
    if (NILP (format) || EQ (format, Qt))
      {
!       face_id = NILP (format)
!       ? CURRENT_MODE_LINE_FACE_ID (w) :
!       HEADER_LINE_FACE_ID;
!       format = NILP (format)
!       ? current_buffer->mode_line_format
!       : current_buffer->header_line_format;
      }
  
    init_iterator (&it, w, -1, -1, NULL, face_id);
  
    if (NILP (no_props))
      {
!       mode_line_string_face =
!       (face_id == MODE_LINE_FACE_ID ? Qmode_line :
!        face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive :
!        face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil);
! 
!       mode_line_string_face_prop =
!       NILP (mode_line_string_face) ? Qnil :
!       Fcons (Qface, Fcons (mode_line_string_face, Qnil));
  
        /* We need a dummy last element in mode_line_string_list to
         indicate we are building the propertized mode-line string.
         Using mode_line_string_face_prop here GC protects it.  */
!       mode_line_string_list =
!       Fcons (mode_line_string_face_prop, Qnil);
        frame_title_ptr = NULL;
      }
    else
--- 15906,15937 ----
  
    if (NILP (format) || EQ (format, Qt))
      {
!       face_id = (NILP (format)
!                ? CURRENT_MODE_LINE_FACE_ID (w)
!                : HEADER_LINE_FACE_ID);
!       format = (NILP (format)
!               ? current_buffer->mode_line_format
!               : current_buffer->header_line_format);
      }
  
    init_iterator (&it, w, -1, -1, NULL, face_id);
  
    if (NILP (no_props))
      {
!       mode_line_string_face
!       = (face_id == MODE_LINE_FACE_ID ? Qmode_line
!          : face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive
!          : face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil);
! 
!       mode_line_string_face_prop
!       = (NILP (mode_line_string_face) ? Qnil
!          : Fcons (Qface, Fcons (mode_line_string_face, Qnil)));
  
        /* We need a dummy last element in mode_line_string_list to
         indicate we are building the propertized mode-line string.
         Using mode_line_string_face_prop here GC protects it.  */
!       mode_line_string_list
!       = Fcons (mode_line_string_face_prop, Qnil);
        frame_title_ptr = NULL;
      }
    else
***************
*** 21038,21044 ****
  
    if (part == ON_VERTICAL_BORDER)
      cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
!   else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)
      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
    else
      cursor = FRAME_X_OUTPUT (f)->text_cursor;
--- 21058,21065 ----
  
    if (part == ON_VERTICAL_BORDER)
      cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
!   else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
!          || part == ON_SCROLL_BAR)
      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
    else
      cursor = FRAME_X_OUTPUT (f)->text_cursor;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]