updated behaviour of intellisense, replaces only up to cursor position