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 | daabd795082bb3fcee4d8606fc8fce4c8e963d1b (patch) | |
tree | 15a85e802bef98dda1ce6a341c0b74d4cb31a21c /lisp/rect.el | |
parent | 21efd27b1f788a957a1cf5399a11082b12cc77fb (diff) | |
download | emacs-daabd795082bb3fcee4d8606fc8fce4c8e963d1b.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) |