When an error occurs in the text editor the cursor moves to the location of the error and selects the word there. However the text space is only updated if the current cursor position moved, not if the selection end did. So if the cursor is already at the end of the word, it looks like nothing has changed while under the hood the word has been selected. This commit simply checks whether the selection has moved and updates the space if so. Pull Request: https://projects.blender.org/blender/blender/pulls/121658