mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:46:00 +01:00
Do not call HighlightRects if there was no usable output from synctex view
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
950a52b612
commit
06205940bb
2 changed files with 9 additions and 1 deletions
2
main.c
2
main.c
|
@ -110,7 +110,7 @@ main(int argc, char* argv[])
|
||||||
free(real_path);
|
free(real_path);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
girara_error("Could not find open instance for '%s'", real_path);
|
girara_error("Could not find open instance for '%s' or got no usable output from 'synctex view'.", real_path);
|
||||||
free(real_path);
|
free(real_path);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* See LICENSE file for license and copyright information */
|
/* See LICENSE file for license and copyright information */
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include <girara/utils.h>
|
||||||
|
|
||||||
#include "synctex.h"
|
#include "synctex.h"
|
||||||
#include "zathura.h"
|
#include "zathura.h"
|
||||||
|
@ -259,6 +260,13 @@ synctex_rectangles_from_position(const char* filename, const char* position,
|
||||||
g_scanner_destroy(scanner);
|
g_scanner_destroy(scanner);
|
||||||
close(output);
|
close(output);
|
||||||
|
|
||||||
|
if (ret == false) {
|
||||||
|
girara_debug("Got no usable output from running synctex view.");
|
||||||
|
girara_list_free(hitlist);
|
||||||
|
girara_list_free(other_rects);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (page != NULL) {
|
if (page != NULL) {
|
||||||
*page = rpage;
|
*page = rpage;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue