changeset 104387:1229ad8aec26

(ns-open-file-select-line): Use line-beginning-position rather than goto-line.
author Glenn Morris <rgm@gnu.org>
date Fri, 21 Aug 2009 07:31:10 +0000
parents 2e0765155e47
children 395f430854da
files lisp/ChangeLog lisp/term/ns-win.el
diffstat 2 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Aug 21 07:24:26 2009 +0000
+++ b/lisp/ChangeLog	Fri Aug 21 07:31:10 2009 +0000
@@ -1,5 +1,8 @@
 2009-08-21  Glenn Morris  <rgm@gnu.org>
 
+	* 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):
--- a/lisp/term/ns-win.el	Fri Aug 21 07:24:26 2009 +0000
+++ b/lisp/term/ns-win.el	Fri Aug 21 07:31:10 2009 +0000
@@ -728,18 +728,21 @@
                  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)))