+2013-07-17 Eli Zaretskii <eliz@gnu.org>
+
+ * simple.el (line-move-partial, line-move): Don't start vscroll or
+ scroll-up if the current line is not taller than the window.
+ (Bug#14881)
+
2013-07-16 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Do not
(this-ypos (nth 2 this-lh))
(dlh (default-line-height))
(wslines (window-screen-lines))
+ (edges (window-inside-pixel-edges))
+ (winh (- (nth 3 edges) (nth 1 edges) 1))
py vs last-line)
(if (> (mod wslines 1.0) 0.0)
(setq wslines (round (+ wslines 0.5))))
nil)
;; If cursor is not in the bottom scroll margin, and the
;; current line is is not too tall, move forward.
- ((and (or (null this-height) (<= this-height dlh))
+ ((and (or (null this-height) (<= this-height winh))
vpos
(> vpos 0)
(< py last-line))
(> vpos 0)
(= py last-line))
;; Don't vscroll if the partially-visible line at window
- ;; bottom has the default height (a.k.a. "just one more text
+ ;; bottom is not too tall (a.k.a. "just one more text
;; line"): in that case, we do want redisplay to behave
;; normally, i.e. recenter or whatever.
;;
;; partially-visible glyph row at the end of the window. As
;; we are dealing with floats, we disregard sub-pixel
;; discrepancies between that and DLH.
- (if (and rowh rbot (>= (- (+ rowh rbot) dlh) 1))
+ (if (and rowh rbot (>= (- (+ rowh rbot) winh) 1))
(set-window-vscroll nil dlh t))
(line-move-1 arg noerror to-end)
t)
;; If we moved into a tall line, set vscroll to make
;; scrolling through tall images more smooth.
(let ((lh (line-pixel-height))
- (dlh (default-line-height)))
+ (edges (window-inside-pixel-edges))
+ (dlh (default-line-height))
+ winh)
+ (setq winh (- (nth 3 edges) (nth 1 edges) 1))
(if (and (< arg 0)
(< (point) (window-start))
- (> lh dlh))
+ (> lh winh))
(set-window-vscroll
nil
(- lh dlh) t))))