Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7beba943
Commit
7beba943
authored
Apr 15, 2009
by
Chong Yidong
Browse files
* subr.el (posn-col-row): Properly compute line spacing.
Suggested by Nikolaj Schumacher (Bug#2933).
parent
ed8ab760
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/subr.el
lisp/subr.el
+13
-7
No files found.
lisp/ChangeLog
View file @
7beba943
2009-04-15 Chong Yidong <cyd@stupidchicken.com>
* subr.el (posn-col-row): Properly compute line spacing.
Suggested by Nikolaj Schumacher (Bug#2933).
2009-04-15 Ulf Jasper <ulf.jasper@web.de>
* net/newst-treeview.el (newsticker-treeview-jump): Enable virtual
...
...
lisp/subr.el
View file @
7beba943
...
...
@@ -930,13 +930,19 @@ and `event-end' functions."
(
cons
(
scroll-bar-scale
pair
(
window-width
window
))
0
))
(
t
(
let*
((
frame
(
if
(
framep
window
)
window
(
window-frame
window
)))
(
x
(
/
(
car
pair
)
(
frame-char-width
frame
)))
(
y
(
/
(
cdr
pair
)
(
+
(
frame-char-height
frame
)
(
or
(
frame-parameter
frame
'line-spacing
)
;; FIXME: Why the `default'?
(
default-value
'line-spacing
)
0
)))))
(
cons
x
y
))))))
;; FIXME: This should take line-spacing properties on
;; newlines into account.
(
spacing
(
when
(
display-graphic-p
frame
)
(
or
(
with-current-buffer
(
window-buffer
window
)
line-spacing
)
(
frame-parameter
frame
'line-spacing
)))))
(
cond
((
floatp
spacing
)
(
setq
spacing
(
truncate
(
*
spacing
(
frame-char-height
frame
)))))
((
null
spacing
)
(
setq
spacing
0
)))
(
cons
(
/
(
car
pair
)
(
frame-char-width
frame
))
(
/
(
cdr
pair
)
(
+
(
frame-char-height
frame
)
spacing
))))))))
(
defun
posn-actual-col-row
(
position
)
"Return the actual column and row in POSITION, measured in characters.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment