fix editor getting stuck in drag mode 

and nicer behavior for  up/down (when selection is multiline going in direction of anchor moves cursor into position of anchor)
@lennartcl