diff options
| author | Richard M. Stallman | 1997-09-03 21:09:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-09-03 21:09:39 +0000 |
| commit | daabd795082bb3fcee4d8606fc8fce4c8e963d1b (patch) | |
| tree | 15a85e802bef98dda1ce6a341c0b74d4cb31a21c /lisp | |
| parent | 21efd27b1f788a957a1cf5399a11082b12cc77fb (diff) | |
| download | emacs-daabd795082bb3fcee4d8606fc8fce4c8e963d1b.tar.gz emacs-daabd795082bb3fcee4d8606fc8fce4c8e963d1b.zip | |
(operate-on-rectangle): If we overshoot when looking for endcol, back up.
Diffstat (limited to 'lisp')
| -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." | |||
| 60 | (setq begextra (- (current-column) startcol)) | 60 | (setq begextra (- (current-column) startcol)) |
| 61 | (setq startpos (point)) | 61 | (setq startpos (point)) |
| 62 | (move-to-column endcol coerce-tabs) | 62 | (move-to-column endcol coerce-tabs) |
| 63 | ;; If we overshot, move back one character | ||
| 64 | ;; so that endextra will be positive. | ||
| 65 | (if (and (not coerce-tabs) (> (current-column) endcol)) | ||
| 66 | (backward-char 1)) | ||
| 63 | (setq endextra (- endcol (current-column))) | 67 | (setq endextra (- endcol (current-column))) |
| 64 | (if (< begextra 0) | 68 | (if (< begextra 0) |
| 65 | (setq endextra (+ endextra begextra) | 69 | (setq endextra (+ endextra begextra) |