summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-27 23:44:23 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-28 01:34:15 -0300
commit2f544de75a1b589448133e52e6f97fce12b428b8 (patch)
tree93063f84353632aed25cafb5110607d0b4a023b2 /gui
parentde2a27cf394d781f77d31a56dd5e7b9e1dc53b34 (diff)
downloadeeshow-2f544de75a1b589448133e52e6f97fce12b428b8.tar.gz
eeshow-2f544de75a1b589448133e52e6f97fce12b428b8.tar.bz2
eeshow-2f544de75a1b589448133e52e6f97fce12b428b8.zip
gui/history.c (skip_history): don't skip entries that are heads of branches
Also simplified the function a little.
Diffstat (limited to 'gui')
-rw-r--r--gui/history.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/history.c b/gui/history.c
index 0a98d18..f76bb1d 100644
--- a/gui/history.c
+++ b/gui/history.c
@@ -216,12 +216,15 @@ static struct gui_hist *skip_history(struct gui *gui, struct gui_hist *h)
return h;
/* need at least two entries */
- if (!h->identical || !h->next || !h->next->identical)
+ if (!h->next || !h->next->identical)
return h;
/* don't skip the last entry */
- for (n = 0; h->next && h->identical; h = h->next)
+ for (n = 0; h->next && h->identical && !h->vcs_hist->n_branches;
+ h = h->next)
n++;
+ if (!n)
+ return h;
h->over = overlay_add(&gui->hist_overlays, &gui->aois,
NULL, ignore_click, h);