@@ -914,13 +914,14 @@ older Emacsen."
914
914
(defun evil-posn-x-y (position)
915
915
"Return the x and y coordinates in POSITION.
916
916
This function returns y offset from the top of the buffer area including
917
- the header line.
917
+ the header line and the tab line (on Emacs 27 and later versions) .
918
918
919
919
On Emacs 24 and later versions, the y-offset returned by
920
920
`posn-at-point' is relative to the text area excluding the header
921
- line, while y offset taken by `posn-at-x-y' is relative to the buffer
922
- area including the header line. This asymmetry is by design according
923
- to GNU Emacs team. This function fixes the asymmetry between them.
921
+ line and the tab line, while y offset taken by `posn-at-x-y' is relative to
922
+ the buffer area including the header line and the tab line.
923
+ This asymmetry is by design according to GNU Emacs team.
924
+ This function fixes the asymmetry between them.
924
925
925
926
Learned from mozc.el."
926
927
(let ((xy (posn-x-y position)))
@@ -930,6 +931,8 @@ Learned from mozc.el."
930
931
(window-header-line-height))
931
932
evil-cached-header-line-height
932
933
(setq evil-cached-header-line-height (evil-header-line-height))))))
934
+ (when (fboundp 'window-tab-line-height)
935
+ (setcdr xy (+ (cdr xy) (window-tab-line-height))))
933
936
xy))
934
937
935
938
(defun evil-count-lines (beg end)
0 commit comments