On 14/10/17 08:47, Eli Zaretskii wrote:
Cc: kaushal.modi@gmail.com, 27647@debbugs.gnu.org,
 jonaswestlund101@gmail.com, npostavs@users.sourceforge.net
From: Romanos Skiadas <rom.skiad@gmail.com>
Date: Fri, 13 Oct 2017 19:14:10 +0100

It is indeed a GTK3 build and setting x-gtk-use-system-tooltips to nil does indeed make this problem go away.
What about disabling scroll-bar-mode, while leaving the GTK tooltips
in use -- does that also make the problem go away?

Thanks.
Just checked, still shows up with scroll-bar-mode disabled and the 
tooltips in use.
What if you turn on display-line-numbers globally -- does the problem
persist in that case with your default settings for GTK tooltips?

Nope, still a problem with this init file:
(global-display-line-numbers-mode)
(add-to-list 'load-path "~/Code/evil")
(require 'evil)
(evil-mode 1)
(add-hook 'text-mode-hook 'flyspell-mode) ;; don't have to create the overlay manually

$ emacs -Q -l /txt/config.el /tmp/foo.txt

I spent some time looking into evil and tracked the problem in these lines of the function that is bound to [mouse-1]:

https://github.com/emacs-evil/evil/blob/89ab1e2ae5e59140bab4f8509b9e4c336ba375ea/evil-commands.el#L4225
https://github.com/emacs-evil/evil/blob/89ab1e2ae5e59140bab4f8509b9e4c336ba375ea/evil-commands.el#L4245

They call this function that moves point and mark:
https://github.com/emacs-evil/evil/blob/89ab1e2ae5e59140bab4f8509b9e4c336ba375ea/evil-commands.el#L4304
which as the comment says is just a copy of mouse--drag-set-mark-and-point Is this in any way helpful?

I'm playing with the debugger now so I might have something more useful later.

Best,
Romanos