I have some form of this problem, too (Geany git, GTK 2.24.30, GLib 2.48.2):
![lines-bug](https://user-images.githubusercontent.com/300211/27369865-8a0a20c2-5662-11e7...)
This used to happen to me often with Geany 1.27. I thought I got rid of the problem on Geany master, but apparently not.