Commit: e4f71e5ef345070dc0b21df35a049184d3e46645
Author: Campbell Barton
Date:   Wed Apr 6 13:14:21 2022 +1000
Branches: master
https://developer.blender.org/rBe4f71e5ef345070dc0b21df35a049184d3e46645

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

Off by one error placing text from an error.

===================================================================

M       source/blender/python/intern/bpy_interface_run.c

===================================================================

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);
   }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to