It seems that I managed to fix the highlighting problem with copypaste in a somewhat acceptable way, at least I hope so.
It required some nudging and bumping in tilehighlight_type.h but it is working again. (-> half like before

The only downside of getting it to work again is that when using the terraform tools you first have to click somewhere on the map before the higlighting of that tool kicks into action. If you hold shift while doing so you wil get a cost estimate and you do not accidently raise the wrong tile.
Also some changes in trunk have fixed the issues with the BR420 and the ICE3 from the DB set it seems.
Updated:
- Cargodist to r21642
- Partial refit patch reduced to the select all vehicles button. (Trunk in r21567)
Changed:
- When vehicle income is too low to display due to the daylength factor pay 1.
- Adjusted CopyPaste to trunk. (exept for the TILE_LOOP.)
- Adjusted Wallclock (departures gui patch) to trunk. (strgen_tables.h, strings.cpp)
- Adjusted measurements tools to trunk.
- Maybe adjusted another patch to trunk along the way that I forgot to mention ...
Todo:
- Fix saving copypaste templates. (If you try the game will crash!)
- As advanced maths is beyond me, and I have to study the code provided by Alberth some more before understanding how it works exactly, I still have to implement the fractional vehicle income. (See a few post back.)
To test:
Please test everything related to tilehighlighting, I think I tested about everything from buying rails to funding new towns but I might have missed something.
Remember to keep backups, also when creating scenarios, you never know when the reduce to 0 bytes bug might strike again. I have tried saving over and over again yesterday but I could not reproduce it and I still do not know what is the cause of it happening sometimes.
Enjoy.