]> git.eshelyaron.com Git - emacs.git/commitdiff
(compute_motion): Fix bug of handling wide-column
authorKenichi Handa <handa@m17n.org>
Thu, 7 May 1998 06:41:12 +0000 (06:41 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 7 May 1998 06:41:12 +0000 (06:41 +0000)
character around right margin.

src/indent.c

index 639cfdae818382de925fa2d9ee20d8a95b4255f4..fa1dc0a29321c32bf745ab729f8794630bbc9139 100644 (file)
@@ -1223,7 +1223,9 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
        }
 
       /* Stop if past the target buffer position or screen position.  */
-      if (pos > to)
+      if (pos > to
+         || vpos > tovpos
+         || vpos == tovpos && hpos > tohpos)
        {
          /* Go back to the previous position.  */
          pos = prev_pos;
@@ -1256,24 +1258,6 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
          break;
        }
 
-      if (vpos > tovpos || vpos == tovpos && hpos >= tohpos)
-       {
-         if (contin_hpos && prev_hpos == 0
-             && ((hpos > tohpos && contin_hpos == width)
-                 || (wide_column_end_hpos > width)))
-           { /* Line breaks because we can't put the character at the
-                previous line any more.  It is not the multi-column
-                character continued in middle.  Go back to previous
-                buffer position, screen position, and set tab offset
-                to previous value.  It's the beginning of the
-                line.  */
-             pos = prev_pos;
-             pos_byte = prev_pos_byte;
-             hpos = prev_hpos;
-             tab_offset = prev_tab_offset;
-           }
-         break;
-       }
       if (pos == ZV) /* We cannot go beyond ZV.  Stop here. */
        break;