@@ -3739,7 +3739,7 @@ Detail: https://github.com/jrblevin/markdown-mode/issues/79"
37393739
37403740(defmacro markdown-temp-eww (&rest body )
37413741 `(progn
3742- ,@(if (featurep 'eww ) body
3742+ ,@(if (require 'eww nil t ) body
37433743 `((ad-enable-advice #'markdown-live-preview-window-eww
37443744 'around 'markdown-create-fake-eww )
37453745 (ad-activate #'markdown-live-preview-window-eww )
@@ -3802,28 +3802,31 @@ Detail: https://github.com/jrblevin/markdown-mode/issues/79"
38023802 ; ; test that still starts at point-min
38033803 (with-selected-window (get-buffer-window markdown-live-preview-buffer)
38043804 (should (= (window-point ) 1 ))
3805- (goto-char (point-max ))
3806- (setq final-pt (point )
3807- final-win-st-diff (markdown-get-lines-between-points
3808- (window-start ) final-pt)))
3805+ (should (= (markdown-visual-lines-between-points
3806+ (window-start ) (window-point ))
3807+ 0 ))
3808+ (set-window-point (selected-window ) (point-max ))
3809+ (setq final-pt (window-point )
3810+ final-win-st-diff (markdown-visual-lines-between-points
3811+ (window-start ) (window-point ))))
38093812 (goto-char (point-min ))
38103813 (insert " this is " )
38113814 (markdown-live-preview-export)
3812- ; ; test that still starts at point-max, with correct line difference
38133815 (with-selected-window (get-buffer-window markdown-live-preview-buffer)
38143816 (should (= (window-point ) (+ final-pt (length " this is " ))))
3815- (should (= (markdown-get -lines-between-points
3817+ (should (= (markdown-visual -lines-between-points
38163818 (window-start ) (window-point ))
38173819 final-win-st-diff))
3820+ ; ; test that still starts at point-max, with correct line difference
38183821 (goto-char (floor (/ (float (- (point-max ) (point-min ))) 2 )))
38193822 (setq final-pt (point )
3820- final-win-st-diff (markdown-get -lines-between-points
3823+ final-win-st-diff (markdown-visual -lines-between-points
38213824 (window-start ) final-pt)))
38223825 (markdown-live-preview-export)
38233826 ; ; test that still starts at same point, with correct line difference
38243827 (with-selected-window (get-buffer-window markdown-live-preview-buffer)
38253828 (should (= (window-point ) final-pt))
3826- (should (= (markdown-get -lines-between-points
3829+ (should (= (markdown-visual -lines-between-points
38273830 (window-start ) (window-point ))
38283831 final-win-st-diff)))))))
38293832
0 commit comments