emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: posn-at-point get strange info when flycheck enable and (setq trunca


From: Eli Zaretskii
Subject: Re: posn-at-point get strange info when flycheck enable and (setq truncate-lines t)
Date: Wed, 17 Jan 2018 18:02:33 +0200

> From: "Feng Shu" <address@hidden>
> Date: Wed, 17 Jan 2018 19:11:44 +0800
> Cc: "address@hidden" <address@hidden>
> 
> The problem I faced is that when I use posn-at-point to
> get buffer POS's pixel position. it will get the picture's pixel position.
> 
> The two (X .Y) position is not equal, for example
> 
>   (#<window 3 on test.el> 31 (65 . 111) 0 (! . 0) 31 (5 . 3) nil (0 . 24) (13 
> . 29))
>   (#<window 3 on test.el> 31 (65 . 87) 0 nil 31 (5 . 3) nil (0 . 0) (13 . 29))
> 
> Is it possible force get buffer POS's pixel position?

Is the character at buffer position 32 visible in the window?  Or is
it "covered" by an overlay or display property?  If it's visible, this
could be a bug.  Can you prepare a short Lisp fragment that would
generate the same kind of overlay as flycheck does, and which exhibits
the same problem with posn-at-point?  Then I could look into fixing
that if necessary.

Btw, note that if you subtract the DX/DY pair from the X/Y coordinates
in the first position data, you get the X/Y coordinates of the second
data.  Maybe that's all you need.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]