bug#2993: 23.0.92; posn-col-row wrong with line-spacing in terminals
Nikolaj Schumacher <[email protected]>
| Newsgroups | gmane.emacs.bugs,gmane.emacs.pretest.bugs |
|---|---|
| Message-ID | <[email protected]> |
posn-col-row uses the `line-spacing' value in terminals. According to the
doc `line-spacing' only has an effect in window systems.
Steps to reproduce:
- (setq-default line-spacing 3)
- emacsclient -t
- Move to a non-trivial pos.
- M-: (posn-col-row (posn-at-point))
Something like this would help:
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -934,7 +934,8 @@ and `event-end' functions."
(y (/ (cdr pair) (+ (frame-char-height frame)
(or (frame-parameter frame 'line-spacing)
;; FIXME: Why the `default'?
- (default-value 'line-spacing)
+ (when (window-system frame)
+ (default-value 'line-spacing))
0)))))
(cons x y))))))