[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: |
Feng Shu |
Subject: |
Re: posn-at-point get strange info when flycheck enable and (setq truncate-lines t) |
Date: |
Wed, 17 Jan 2018 19:11:44 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) |
Andreas Schwab <address@hidden> writes:
> On Jan 17 2018, tumashu <address@hidden> wrote:
>
>> When I enable flycheck and (setq truncate-lines t)
>> sometimes posn-at-point get strange info like the below:
>>
>>
>> (#<window 3 on test.el> 31 (65 . 111) 0 (! . 0) 31 (5 . 3) nil (0 .
>> 24) (13 . 29))
>
> Strange in which way?
Sorry, it is flycheck's setting:
#+BEGIN_SRC emacs-lisp
(defcustom flycheck-indication-mode 'left-fringe
"The indication mode for Flycheck errors and warnings.
This variable controls how Flycheck indicates errors in buffers.
May either be `left-fringe', `right-fringe', or nil.
If set to `left-fringe' or `right-fringe', indicate errors and
warnings via icons in the left and right fringe respectively.
If set to nil, do not indicate errors and warnings, but just
highlight them according to `flycheck-highlighting-mode'."
:group 'flycheck
:type '(choice (const :tag "Indicate in the left fringe" left-fringe)
(const :tag "Indicate in the right fringe" right-fringe)
(const :tag "Do not indicate" nil))
:safe #'symbolp)
...
(when flycheck-indication-mode
(setf (overlay-get overlay 'before-string)
(flycheck-error-level-make-fringe-icon
level flycheck-indication-mode)))
...
#+END_SRC
flycheck will insert a picture with the help of overlay,
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?
>
> Andreas.
--