1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(operate-on-rectangle): If we overshoot when looking for endcol, back up.

This commit is contained in:
Richard M. Stallman 1997-09-03 21:09:39 +00:00
parent 21efd27b1f
commit daabd79508

View file

@ -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)