diff options
| -rw-r--r-- | lisp/reposition.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/reposition.el b/lisp/reposition.el index 22f9986efb5..111bc0841f4 100644 --- a/lisp/reposition.el +++ b/lisp/reposition.el | |||
| @@ -170,12 +170,13 @@ first comment line visible (if point is in a comment)." | |||
| 170 | 170 | ||
| 171 | ;;; Auxiliary functions | 171 | ;;; Auxiliary functions |
| 172 | 172 | ||
| 173 | |||
| 173 | ;; Return number of screen lines between START and END. | 174 | ;; Return number of screen lines between START and END. |
| 174 | (defun repos-count-screen-lines (start end) | 175 | (defun repos-count-screen-lines (start end) |
| 175 | (save-excursion | 176 | (save-excursion |
| 176 | (save-restriction | 177 | (save-restriction |
| 177 | (narrow-to-region start end) | 178 | (narrow-to-region (point-min) end) |
| 178 | (goto-char (point-min)) | 179 | (goto-char start) |
| 179 | (vertical-motion (- (point-max) (point-min)))))) | 180 | (vertical-motion (- (point-max) (point-min)))))) |
| 180 | 181 | ||
| 181 | ;; Return number of screen lines between START and END; returns a negative | 182 | ;; Return number of screen lines between START and END; returns a negative |