diff --git a/eeshow/README b/eeshow/README index 047f586..b87503c 100644 --- a/eeshow/README +++ b/eeshow/README @@ -174,6 +174,7 @@ Delete or Backspace go to the next higher sheet in hierarchy PgUp go to the previous sheet in sequence PgDn go to the next sheet in sequence Up or Down invoke the revision history (WIP) +Tab toggle between old and new revision D when comparing revisions, show difference (default) N show newer sheet O show older sheet diff --git a/eeshow/TODO b/eeshow/TODO index fab75f5..8deb211 100644 --- a/eeshow/TODO +++ b/eeshow/TODO @@ -47,7 +47,6 @@ GUI: to new_sheet and old_sheet. GUI/history -- use Tab to rapidly toggle between old/new sheet - should have quick way to show diff of a single commit - in history, set font to non-bold if showing details - add scrolling to history, for hot-keys diff --git a/eeshow/gui/sheet.c b/eeshow/gui/sheet.c index 9736bf4..ae62b3a 100644 --- a/eeshow/gui/sheet.c +++ b/eeshow/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;