(shr--window-width)))
(max-specpdl-size max-specpdl-size)
(shr--link-targets nil)
+ (hscroll (window-hscroll))
;; `bidi-display-reordering' is supposed to be only used for
;; debugging purposes, but Shr's naïve filling algorithm
;; cannot cope with the complexity of RTL text in an LTR
;; below will misbehave, because it silently assumes that it
;; starts with a non-hscrolled window (vertical-motion will move
;; to a wrong place otherwise).
- (set-window-hscroll nil 0)
- (shr-descend dom)
- (shr-fill-lines start (point))
- (shr--remove-blank-lines-at-the-end start (point))
- (shr--set-target-ids shr--link-targets)
+ (unwind-protect
+ (progn
+ (set-window-hscroll nil 0)
+ (shr-descend dom)
+ (shr-fill-lines start (point))
+ (shr--remove-blank-lines-at-the-end start (point))
+ (shr--set-target-ids shr--link-targets))
+ (set-window-hscroll nil hscroll))
(when shr-warning
(message "%s" shr-warning))))
Lisp_Object left_col, top_line, total_cols, total_lines;
Lisp_Object normal_cols, normal_lines;
Lisp_Object hscroll, min_hscroll, hscroll_whole, suspend_auto_hscroll;
+ Lisp_Object vscroll;
Lisp_Object parent, prev;
Lisp_Object start_at_line_beg;
Lisp_Object display_table;
w->suspend_auto_hscroll = !NILP (p->suspend_auto_hscroll);
w->min_hscroll = XFIXNAT (p->min_hscroll);
w->hscroll_whole = XFIXNAT (p->hscroll_whole);
+ w->vscroll = -XFIXNAT (p->vscroll);
wset_display_table (w, p->display_table);
w->left_margin_cols = XFIXNUM (p->left_margin_cols);
w->right_margin_cols = XFIXNUM (p->right_margin_cols);
p->suspend_auto_hscroll = w->suspend_auto_hscroll ? Qt : Qnil;
XSETFASTINT (p->min_hscroll, w->min_hscroll);
XSETFASTINT (p->hscroll_whole, w->hscroll_whole);
+ XSETFASTINT (p->vscroll, -w->vscroll);
p->display_table = w->display_table;
p->left_margin_cols = make_fixnum (w->left_margin_cols);
p->right_margin_cols = make_fixnum (w->right_margin_cols);