From d93e053bb544bca58f9d993c538ce45a6946cef6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 21 Aug 2009 07:31:10 +0000 Subject: [PATCH] (ns-open-file-select-line): Use line-beginning-position rather than goto-line. --- lisp/ChangeLog | 3 +++ lisp/term/ns-win.el | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cd5ec74fe8..e73697dcf0d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-08-21 Glenn Morris + * term/ns-win.el (ns-open-file-select-line): + Use line-beginning-position rather than goto-line. + * apropos.el (apropos-command): * ehelp.el (electric-helpify): * printing.el (pr-show-setup): diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index ad026e6fd0d..4435b6cbf04 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -728,18 +728,21 @@ Lines are highlighted according to `ns-input-line'." ns-input-line))) (ns-input-line (if (not ns-select-overlay) - (overlay-put (setq ns-select-overlay (make-overlay (point-min) (point-min))) + (overlay-put (setq ns-select-overlay (make-overlay (point-min) + (point-min))) 'face 'highlight)) (let ((beg (save-excursion - (goto-line (if (consp ns-input-line) - (min (car ns-input-line) (cdr ns-input-line)) - ns-input-line)) - (point))) + (goto-char (point-min)) + (line-beginning-position + (if (consp ns-input-line) + (min (car ns-input-line) (cdr ns-input-line)) + ns-input-line)))) (end (save-excursion - (goto-line (+ 1 (if (consp ns-input-line) - (max (car ns-input-line) (cdr ns-input-line)) - ns-input-line))) - (point)))) + (goto-char (point-min)) + (line-beginning-position + (1+ (if (consp ns-input-line) + (max (car ns-input-line) (cdr ns-input-line)) + ns-input-line)))))) (move-overlay ns-select-overlay beg end) (deactivate-mark) (goto-char beg))) -- 2.39.2