diff options
| -rw-r--r-- | lisp/textmodes/picture.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 878161da481..72c7125593d 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el | |||
| @@ -76,13 +76,19 @@ If scan reaches end of buffer, stop there without error." | |||
| 76 | "Move cursor right, making whitespace if necessary. | 76 | "Move cursor right, making whitespace if necessary. |
| 77 | With argument, move that many columns." | 77 | With argument, move that many columns." |
| 78 | (interactive "p") | 78 | (interactive "p") |
| 79 | (move-to-column-force (+ (current-column) arg))) | 79 | (let ((target-column (+ (current-column) arg))) |
| 80 | (move-to-column-force target-column) | ||
| 81 | ;; Picture mode isn't really suited to multi-column characters, | ||
| 82 | ;; but we might as well let the user move across them. | ||
| 83 | (and (< arg 0) | ||
| 84 | (> (current-column) target-column) | ||
| 85 | (forward-char -1)))) | ||
| 80 | 86 | ||
| 81 | (defun picture-backward-column (arg) | 87 | (defun picture-backward-column (arg) |
| 82 | "Move cursor left, making whitespace if necessary. | 88 | "Move cursor left, making whitespace if necessary. |
| 83 | With argument, move that many columns." | 89 | With argument, move that many columns." |
| 84 | (interactive "p") | 90 | (interactive "p") |
| 85 | (move-to-column-force (- (current-column) arg))) | 91 | (picture-forward-column (- arg))) |
| 86 | 92 | ||
| 87 | (defun picture-move-down (arg) | 93 | (defun picture-move-down (arg) |
| 88 | "Move vertically down, making whitespace if necessary. | 94 | "Move vertically down, making whitespace if necessary. |