summaryrefslogtreecommitdiff
path: root/gui/sheet.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 12:34:37 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 12:34:37 -0300
commit0fe596c2149d470536e7ee1f7a6d30390af96789 (patch)
treeb552f4390564dc57da51b0df866e33cbae18c2e0 /gui/sheet.c
parentb639c798e8af58011b424383366cfa16b88b9229 (diff)
downloadeeshow-0fe596c2149d470536e7ee1f7a6d30390af96789.tar.gz
eeshow-0fe596c2149d470536e7ee1f7a6d30390af96789.tar.bz2
eeshow-0fe596c2149d470536e7ee1f7a6d30390af96789.zip
eeshow/gui/sheet.c (toggle_old_new): Tab toggles between diff_old and diff_new
Diffstat (limited to 'gui/sheet.c')
-rw-r--r--gui/sheet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/sheet.c b/gui/sheet.c
index 9736bf4..ae62b3a 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -177,6 +177,12 @@ static void show_diff_cb(void *user)
}
+static void toggle_old_new(struct gui_ctx *ctx)
+{
+ set_diff_mode(ctx, ctx->diff_mode == diff_new ? diff_old : diff_new);
+}
+
+
static void revision_overlays_diff(struct gui_ctx *ctx)
{
struct gui_hist *new = ctx->new_hist;
@@ -491,6 +497,10 @@ static void sheet_key(void *user, int x, int y, int keyval)
case GDK_KEY_KP_Down:
show_history(ctx, sel_old);
break;
+ case GDK_KEY_Tab:
+ case GDK_KEY_KP_Tab:
+ toggle_old_new(ctx);
+ break;
case GDK_KEY_n:
ctx->diff_mode = diff_new;