0a9ad49 Fix selection handling for inval...

based on: http://github.com/torvalds/subsurface/commit/0a9ad49f0aaf45a4d89c4ed90ce2c5c6fab154d5

compiled with: mingw 3.4.5

notes:
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>