Cleanup: return success from python_script_error_jump

Relying on checks for the assignment of return arguments isn't so
clear especially when there are multiple return arguments.
This commit is contained in:
2022-03-28 17:11:34 +11:00
parent 1466f480c4
commit 387b34f0c2
3 changed files with 9 additions and 12 deletions

View File

@@ -39,8 +39,7 @@ static void python_script_error_jump_text(Text *text, const char *filepath)
{
int lineno, lineno_end;
int offset, offset_end;
python_script_error_jump(filepath, &lineno, &offset, &lineno_end, &offset_end);
if (lineno != -1) {
if (python_script_error_jump(filepath, &lineno, &offset, &lineno_end, &offset_end)) {
/* 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. */