diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-09-03 21:09:39 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-09-03 21:09:39 +0000 |
commit | 0a1855b00bd84ca79e534228b68d1347c9d1cfd4 (patch) | |
tree | 7f09ca652acbf6fe7aeccb6aaeac938f57a0c51d /lisp/rect.el | |
parent | 40e4a6f0e785798629e5dd6d4b39f9bc570c3c54 (diff) | |
download | emacs-0a1855b00bd84ca79e534228b68d1347c9d1cfd4.tar.gz |
(operate-on-rectangle): If we overshoot when looking for endcol, back up.
Diffstat (limited to 'lisp/rect.el')
-rw-r--r-- | lisp/rect.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/rect.el b/lisp/rect.el index d8e742ce6a1..2904f94687a 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -60,6 +60,10 @@ Point is at the end of the segment of this line within the rectangle." (setq begextra (- (current-column) startcol)) (setq startpos (point)) (move-to-column endcol coerce-tabs) + ;; If we overshot, move back one character + ;; so that endextra will be positive. + (if (and (not coerce-tabs) (> (current-column) endcol)) + (backward-char 1)) (setq endextra (- endcol (current-column))) (if (< begextra 0) (setq endextra (+ endextra begextra) |