Fix off by one error placing the text cursor from a Python exception

Off by one error placing text from an error.
This commit is contained in:
Campbell Barton 2022-04-06 13:14:21 +10:00
parent 2e9e2715ef
commit e4f71e5ef3
1 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ static void python_script_error_jump_text(Text *text, const char *filepath)
/* Start at the end so cursor motion that looses the selection,
* leaves the cursor from the most useful place.
* Also, the end can't always be set, so don't give it priority. */
txt_move_to(text, lineno_end - 1, offset_end, false);
txt_move_to(text, lineno - 1, offset, true);
txt_move_to(text, lineno_end - 1, offset_end - 1, false);
txt_move_to(text, lineno - 1, offset - 1, true);
}
}