[closebrackets addon] Fix bug in cursor placement