make rename\gotoDef work at the end of token

enable scenarios when cursor is positioned at the end of token