diff options
| author | Eli Zaretskii | 2015-01-08 16:04:46 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-01-08 16:04:46 +0200 |
| commit | 5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4 (patch) | |
| tree | 253a55de82ec0ae74ed1d05004be77439da0231b /src | |
| parent | ad83cdacb6808377e2ef4f96e60ffb68dbf01cd9 (diff) | |
| download | emacs-5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4.tar.gz emacs-5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4.zip | |
Fix line-move-visual's following of column in R2L lines.
src/simple.el (line-move-visual): When converting X pixel coordinate
to temporary-goal-column, adjust the value for right-to-left
screen lines. This fixes vertical-motion, next/prev-line, etc.
src/dispnew.c (buffer_posn_from_coords): Fix the value of the column
returned for right-to-left screen lines. (Before the change on
2014-12-30, the incorrectly-computed X pixel coordinate concealed
this bug.)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/dispnew.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4365222ff7b..c302f95d3fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2015-01-08 Eli Zaretskii <eliz@gnu.org> | 1 | 2015-01-08 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * dispnew.c (buffer_posn_from_coords): Fix the value of the column | ||
| 4 | returned for right-to-left screen lines. (Before the change on | ||
| 5 | 2014-12-30, the incorrectly-computed X pixel coordinate concealed | ||
| 6 | this bug.) | ||
| 7 | |||
| 3 | * .gdbinit (xsymname): New subroutine. | 8 | * .gdbinit (xsymname): New subroutine. |
| 4 | (xprintsym, initial-tbreak): Use it to access the name of a symbol | 9 | (xprintsym, initial-tbreak): Use it to access the name of a symbol |
| 5 | in a way that doesn't cause GDB to barf when it tries to | 10 | in a way that doesn't cause GDB to barf when it tries to |
diff --git a/src/dispnew.c b/src/dispnew.c index b998e654881..cefcd0809a0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5162,7 +5162,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5162 | 5162 | ||
| 5163 | Fset_buffer (old_current_buffer); | 5163 | Fset_buffer (old_current_buffer); |
| 5164 | 5164 | ||
| 5165 | *dx = x0 + it.first_visible_x - it.current_x; | 5165 | *dx = to_x - it.current_x; |
| 5166 | *dy = *y - it.current_y; | 5166 | *dy = *y - it.current_y; |
| 5167 | 5167 | ||
| 5168 | string = w->contents; | 5168 | string = w->contents; |
| @@ -5237,9 +5237,9 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5237 | } | 5237 | } |
| 5238 | 5238 | ||
| 5239 | /* Add extra (default width) columns if clicked after EOL. */ | 5239 | /* Add extra (default width) columns if clicked after EOL. */ |
| 5240 | x1 = max (0, it.current_x + it.pixel_width - it.first_visible_x); | 5240 | x1 = max (0, it.current_x + it.pixel_width); |
| 5241 | if (x0 > x1) | 5241 | if (to_x > x1) |
| 5242 | it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); | 5242 | it.hpos += (to_x - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); |
| 5243 | 5243 | ||
| 5244 | *x = it.hpos; | 5244 | *x = it.hpos; |
| 5245 | *y = it.vpos; | 5245 | *y = it.vpos; |