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:
parent
21efd27b1f
commit
daabd79508
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue