+2013-10-25 Eli Zaretskii <eliz@gnu.org>
+
+ * simple.el (line-move): Call line-move-1 instead of
+ line-move-visual when the current window hscroll is zero, but
+ temporary-goal-column indicates we will need to hscroll as result
+ of the movement. (Bug#15712)
+
2013-10-25 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-mode-menu): Use proper
;; When the text in the window is scrolled to the left,
;; display-based motion doesn't make sense (because each
;; logical line occupies exactly one screen line).
- (not (> (window-hscroll) 0)))
+ (not (> (window-hscroll) 0))
+ ;; Likewise when the text _was_ scrolled to the left
+ ;; when the current run of vertical motion commands
+ ;; started.
+ (not (and (memq last-command
+ `(next-line previous-line ,this-command))
+ auto-hscroll-mode
+ (numberp temporary-goal-column)
+ (>= temporary-goal-column
+ (- (window-width) hscroll-margin)))))
(prog1 (line-move-visual arg noerror)
;; If we moved into a tall line, set vscroll to make
;; scrolling through tall images more smooth.