In Edit -> Preferences -> Files -> Saving files there is an option named "Strip trailing spaces and tabs". Even if I disable it, Geany still strips spaces at the end of every line everytime a I save a file. I am using Geany 2.0 for Windows but Geany 1.36 for Windows was exactly the same.