summaryrefslogtreecommitdiff
path: root/gui/sheet.c
diff options
context:
space:
mode:
Diffstat (limited to 'gui/sheet.c')
-rw-r--r--gui/sheet.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gui/sheet.c b/gui/sheet.c
index 6131163..138610d 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -57,6 +57,12 @@ static void canvas_coord(const struct gui *gui,
}
+static bool have_history(const struct gui *gui)
+{
+ return gui->vcs_history && !vcs_is_empty(gui->vcs_history);
+}
+
+
/* ----- Zoom -------------------------------------------------------------- */
@@ -372,7 +378,7 @@ void go_to_sheet(struct gui *gui, struct gui_sheet *sheet)
gui->curr_sheet = sheet;
if (gui->old_hist)
render_delta(gui);
- if (gui->vcs_history && !vcs_is_empty(gui->vcs_history))
+ if (have_history(gui))
do_revision_overlays(gui);
do_sheet_overlays(gui);
zoom_to_extents(gui);