aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-01-08 16:04:46 +0200
committerEli Zaretskii2015-01-09 11:06:18 +0200
commit7c0bfa1d0803d824e3adaf9c6431997580771ef6 (patch)
treefda2be0d3c305debeaba26f242830141d4444709 /src
parent2a57b7e5b42175031efb8b4348638a05cb1c52a2 (diff)
downloademacs-7c0bfa1d0803d824e3adaf9c6431997580771ef6.tar.gz
emacs-7c0bfa1d0803d824e3adaf9c6431997580771ef6.zip
Fix line-move-visual's following of column in R2L lines (backport from trunk).
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.) (cherry picked from commit 5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4) Conflicts: lisp/simple.el
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/dispnew.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index acd7e729254..25f3264198d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12015-01-08 Eli Zaretskii <eliz@gnu.org>
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
12015-01-05 Eli Zaretskii <eliz@gnu.org> 82015-01-05 Eli Zaretskii <eliz@gnu.org>
2 9
3 * xdisp.c (move_it_to, try_cursor_movement): Don't use the window 10 * xdisp.c (move_it_to, try_cursor_movement): Don't use the window
diff --git a/src/dispnew.c b/src/dispnew.c
index 205c28f7df8..f73ea58b7f3 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5153,7 +5153,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
5153 5153
5154 Fset_buffer (old_current_buffer); 5154 Fset_buffer (old_current_buffer);
5155 5155
5156 *dx = x0 + it.first_visible_x - it.current_x; 5156 *dx = to_x - it.current_x;
5157 *dy = *y - it.current_y; 5157 *dy = *y - it.current_y;
5158 5158
5159 string = w->contents; 5159 string = w->contents;
@@ -5228,9 +5228,9 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
5228 } 5228 }
5229 5229
5230 /* Add extra (default width) columns if clicked after EOL. */ 5230 /* Add extra (default width) columns if clicked after EOL. */
5231 x1 = max (0, it.current_x + it.pixel_width - it.first_visible_x); 5231 x1 = max (0, it.current_x + it.pixel_width);
5232 if (x0 > x1) 5232 if (to_x > x1)
5233 it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); 5233 it.hpos += (to_x - x1) / WINDOW_FRAME_COLUMN_WIDTH (w);
5234 5234
5235 *x = it.hpos; 5235 *x = it.hpos;
5236 *y = it.vpos; 5236 *y = it.vpos;