Mercurial > emacs
changeset 6120:121ee28dbda0
(picture-forward-column, picture-backward-column): Allow backward motion
across multi-column characters.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 01 Mar 1994 06:19:22 +0000 |
parents | 9e150a376c32 |
children | a9caf92da1d3 |
files | lisp/textmodes/picture.el |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/picture.el Tue Mar 01 04:54:43 1994 +0000 +++ b/lisp/textmodes/picture.el Tue Mar 01 06:19:22 1994 +0000 @@ -76,13 +76,19 @@ "Move cursor right, making whitespace if necessary. With argument, move that many columns." (interactive "p") - (move-to-column-force (+ (current-column) arg))) + (let ((target-column (+ (current-column) arg))) + (move-to-column-force target-column) + ;; Picture mode isn't really suited to multi-column characters, + ;; but we might as well let the user move across them. + (and (< arg 0) + (> (current-column) target-column) + (forward-char -1)))) (defun picture-backward-column (arg) "Move cursor left, making whitespace if necessary. With argument, move that many columns." (interactive "p") - (move-to-column-force (- (current-column) arg))) + (picture-forward-column (- arg))) (defun picture-move-down (arg) "Move vertically down, making whitespace if necessary.