emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101021: Fix overlay arrow display, m


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101021: Fix overlay arrow display, make doc strings bidi-friendly.
Date: Sun, 08 Aug 2010 19:51:56 +0300
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101021 [merge]
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2010-08-08 19:51:56 +0300
message:
  Fix overlay arrow display, make doc strings bidi-friendly.
  
   xdisp.c (display_line): Move the handling of overlay arrow after
   the call to find_row_edges.  (Bug#6699)
   cmds.c (Fforward_line, Fbeginning_of_line, Fend_of_line):
   editfns.c (Fline_beginning_position, Fline_end_position): State
   in the doc strings that start and end of line are in the logical order.
modified:
  src/ChangeLog
  src/cmds.c
  src/editfns.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-08-07 20:26:55 +0000
+++ b/src/ChangeLog     2010-08-08 16:43:26 +0000
@@ -1,3 +1,13 @@
+2010-08-08  Eli Zaretskii  <address@hidden>
+
+       * cmds.c (Fforward_line, Fbeginning_of_line, Fend_of_line):
+       * editfns.c (Fline_beginning_position, Fline_end_position): State
+       in the doc strings that start and end of line are in the logical
+       order.
+
+       * xdisp.c (display_line): Move the handling of overlay arrow after
+       the call to find_row_edges.  (Bug#6699)
+
 2010-08-07  Chong Yidong  <address@hidden>
 
        * keyboard.c (command_loop_1):

=== modified file 'src/cmds.c'
--- a/src/cmds.c        2010-07-29 05:48:06 +0000
+++ b/src/cmds.c        2010-08-08 16:43:26 +0000
@@ -113,7 +113,8 @@
 
 DEFUN ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p",
        doc: /* Move N lines forward (backward if N is negative).
-Precisely, if point is on line I, move to the start of line I + N.
+Precisely, if point is on line I, move to the start of line I + N
+\("start of line" in the logical order).
 If there isn't room, go as far as possible (no error).
 Returns the count of lines left to move.  If moving forward,
 that is N - number of lines moved; if backward, N + number moved.
@@ -157,7 +158,7 @@
 }
 
 DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "^p",
-       doc: /* Move point to beginning of current line.
+       doc: /* Move point to beginning of current line (in the logical order).
 With argument N not nil or 1, move forward N - 1 lines first.
 If point reaches the beginning or end of buffer, it stops there.
 
@@ -181,7 +182,7 @@
 }
 
 DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "^p",
-       doc: /* Move point to end of current line.
+       doc: /* Move point to end of current line (in the logical order).
 With argument N not nil or 1, move forward N - 1 lines first.
 If point reaches the beginning or end of buffer, it stops there.
 To ignore intangibility, bind `inhibit-point-motion-hooks' to t.

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2010-08-05 23:34:12 +0000
+++ b/src/editfns.c     2010-08-08 16:43:26 +0000
@@ -805,6 +805,9 @@
 With argument N not nil or 1, move forward N - 1 lines first.
 If scan reaches end of buffer, return that position.
 
+The returned position is of the first character in the logical order,
+i.e. the one that has the smallest character position.
+
 This function constrains the returned position to the current field
 unless that would be on a different line than the original,
 unconstrained result.  If N is nil or 1, and a front-sticky field
@@ -843,6 +846,9 @@
 With argument N not nil or 1, move forward N - 1 lines first.
 If scan reaches end of buffer, return that position.
 
+The returned position is of the last character in the logical order,
+i.e. the character whose buffer position is the largest one.
+
 This function constrains the returned position to the current field
 unless that would be on a different line than the original,
 unconstrained result.  If N is nil or 1, and a rear-sticky field ends

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-08-06 19:07:16 +0000
+++ b/src/xdisp.c       2010-08-08 16:23:11 +0000
@@ -11352,6 +11352,8 @@
          && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
        {
          if (FRAME_WINDOW_P (it->f)
+             /* FIXME: if ROW->reversed_p is set, this should test
+                the right fringe, not the left one.  */
              && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
            {
 #ifdef HAVE_WINDOW_SYSTEM
@@ -17798,6 +17800,26 @@
       row->truncated_on_left_p = 1;
     }
 
+  /* Remember the position at which this line ends.
+
+     BIDI Note: any code that needs MATRIX_ROW_START/END_CHARPOS
+     cannot be before the call to find_row_edges below, since that is
+     where these positions are determined. */
+  row->end = it->current;
+  if (!it->bidi_p)
+    {
+      row->minpos = row->start.pos;
+      row->maxpos = row->end.pos;
+    }
+  else
+    {
+      /* ROW->minpos and ROW->maxpos must be the smallest and
+        `1 + the largest' buffer positions in ROW.  But if ROW was
+        bidi-reordered, these two positions can be anywhere in the
+        row, so we must determine them now.  */
+      find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos);
+    }
+
   /* If the start of this line is the overlay arrow-position, then
      mark this glyph row as the one containing the overlay arrow.
      This is clearly a mess with variable size fonts.  It would be
@@ -17843,22 +17865,6 @@
   /* Compute pixel dimensions of this line.  */
   compute_line_metrics (it);
 
-  /* Remember the position at which this line ends.  */
-  row->end = it->current;
-  if (!it->bidi_p)
-    {
-      row->minpos = row->start.pos;
-      row->maxpos = row->end.pos;
-    }
-  else
-    {
-      /* ROW->minpos and ROW->maxpos must be the smallest and
-        `1 + the largest' buffer positions in ROW.  But if ROW was
-        bidi-reordered, these two positions can be anywhere in the
-        row, so we must determine them now.  */
-      find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos);
-    }
-
   /* Record whether this row ends inside an ellipsis.  */
   row->ends_in_ellipsis_p
     = (it->method == GET_FROM_DISPLAY_VECTOR


reply via email to

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