diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-06 06:14:21 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:31:58 +0300 |
commit | d99e0abda0d171a7ac69410c5a605ac12a4257b4 (patch) | |
tree | e0f25fb04a74029636750a746394b9f243d6ff82 | |
parent | c7972d861775ffeecaacf0c4f3087ef5f2d81675 (diff) |
Fix off by one error placing the text cursor from a Python exception
Off by one error placing text from an error.
-rw-r--r-- | source/blender/python/intern/bpy_interface_run.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c index 9299bd196e2..147c6cf8187 100644 --- a/source/blender/python/intern/bpy_interface_run.c +++ b/source/blender/python/intern/bpy_interface_run.c @@ -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); } } |