GNU bug report logs -
#18504
24.3.93; posn-at-point intermittently returns wrong value for a valid buffer position
Previous Next
Reported by: Dmitry <dgutov <at> yandex.ru>
Date: Fri, 19 Sep 2014 01:02:02 UTC
Severity: normal
Found in version 24.3.93
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 18504 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 19 Sep 2014 17:46:57 +0400
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> CC: 18504 <at> debbugs.gnu.org
>
> On 09/19/2014 05:35 PM, Eli Zaretskii wrote:
>
> > Btw, why is it important what happens when the user types C-g, i.e. if
> > she abandons the completion? Or does the problem happen without C-g
> > as well?
>
> I'm not quite sure how we get to that point, to be honest.
??? Your recipe includes fast presses on C-/ and C-g. Or did I
misunderstand?
> --- a/company.el
> +++ b/company.el
> @@ -782,7 +782,13 @@ means that `company-mode' is always turned on
> except in `message-mode' buffers."
> (cons (+ col (window-hscroll)) row)))
>
> (defun company--col-row (&optional pos)
> - (company--posn-col-row (posn-at-point pos)))
> + (let ((posn (posn-at-point pos)))
> + ;; Completion should be invoked at column > 1.
> + (when (zerop (car (posn-x-y posn)))
> + (message "company--col-row zero!")
> + (message "then:")
> + (message "%s" (posn-x-y (posn-at-point pos))))
> + (company--posn-col-row posn)))
>
> (defun company--row (&optional pos)
> (cdr (company--col-row pos)))
>
> I get:
>
> company--col-row zero!
> then:
> (0 . 198)
Thanks, but with what sequence of commands do you get that?
This bug report was last modified 10 years and 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.