diff options
| author | Kim F. Storm | 2002-07-04 22:20:26 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-07-04 22:20:26 +0000 |
| commit | 42cc3428ed2707f7a3fadcaaa827f9c8010b4c8f (patch) | |
| tree | 2843862374d5281bf997ccdbe7e0d40e2bbe4f4b | |
| parent | 6d6f3bc1c829dd394bd701a98728ffcc929a95f0 (diff) | |
| download | emacs-42cc3428ed2707f7a3fadcaaa827f9c8010b4c8f.tar.gz emacs-42cc3428ed2707f7a3fadcaaa827f9c8010b4c8f.zip | |
(cua--rectangle-operation): Don't call
FCT if current column is outside rectangle.
(cua--delete-rectangle): Do nothing if zero width or out of bounds.
| -rw-r--r-- | lisp/emulation/cua-rect.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index f7dd08bdd0a..a0663d93d2a 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el | |||
| @@ -575,7 +575,7 @@ If command is repeated at same position, delete the rectangle." | |||
| 575 | (forward-char 1)) | 575 | (forward-char 1)) |
| 576 | (set-marker m (point)) | 576 | (set-marker m (point)) |
| 577 | (move-to-column l pad) | 577 | (move-to-column l pad) |
| 578 | (if fct | 578 | (if (and fct (>= (current-column) l) (<= (current-column) r)) |
| 579 | (let ((v t) (p (point))) | 579 | (let ((v t) (p (point))) |
| 580 | (when sel | 580 | (when sel |
| 581 | (if (car (cdr sel)) | 581 | (if (car (cdr sel)) |
| @@ -614,7 +614,8 @@ If command is repeated at same position, delete the rectangle." | |||
| 614 | (defun cua--delete-rectangle () | 614 | (defun cua--delete-rectangle () |
| 615 | (cua--rectangle-operation nil nil t 2 | 615 | (cua--rectangle-operation nil nil t 2 |
| 616 | '(lambda (s e l r) | 616 | '(lambda (s e l r) |
| 617 | (delete-region s (if (> e s) e (1+ e)))))) | 617 | (if (and (> e s) (<= e (point-max))) |
| 618 | (delete-region s e))))) | ||
| 618 | 619 | ||
| 619 | (defun cua--extract-rectangle () | 620 | (defun cua--extract-rectangle () |
| 620 | (let (rect) | 621 | (let (rect) |