diff options
| author | Eli Zaretskii | 2017-05-10 19:58:06 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-05-10 19:58:06 +0300 |
| commit | de53dfcea3e1fdc6af171678300deb591b509cc4 (patch) | |
| tree | 34c99f1ee09186385fcb449f6b285c743220b482 | |
| parent | 48e6e9a939cd0442497ee2e7b317d94ff9103cfb (diff) | |
| download | emacs-de53dfcea3e1fdc6af171678300deb591b509cc4.tar.gz emacs-de53dfcea3e1fdc6af171678300deb591b509cc4.zip | |
Fix vertical cursor motion when columns are of unequal size
* lisp/simple.el (line-move-finish): In line-move-visual mode, use
vertical-motion to move to the goal column, as the goal column
should in that case be interpreted in units of frame's canonical
character width. (Bug#26852)
| -rw-r--r-- | lisp/simple.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index edc822eb51e..dfa30372dda 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6399,7 +6399,12 @@ If NOERROR, don't signal an error if we can't move that many lines." | |||
| 6399 | (point)))) | 6399 | (point)))) |
| 6400 | 6400 | ||
| 6401 | ;; Move to the desired column. | 6401 | ;; Move to the desired column. |
| 6402 | (line-move-to-column (truncate column)) | 6402 | (if line-move-visual |
| 6403 | ;; Under line-move-visual, goal-column should be | ||
| 6404 | ;; interpreted in units of the frame's canonical character | ||
| 6405 | ;; width, which is exactly what vertical-motion does. | ||
| 6406 | (vertical-motion (cons column 0)) | ||
| 6407 | (line-move-to-column (truncate column))) | ||
| 6403 | 6408 | ||
| 6404 | ;; Corner case: suppose we start out in a field boundary in | 6409 | ;; Corner case: suppose we start out in a field boundary in |
| 6405 | ;; the middle of a continued line. When we get to | 6410 | ;; the middle of a continued line. When we get to |