Commit d93e053b authored by Glenn Morris's avatar Glenn Morris
Browse files

(ns-open-file-select-line): Use line-beginning-position rather than goto-line.

parent d5d105e8
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):
......
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment