From ed26259e6dba4600c8d4ad0423e3e700312ab4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Thu, 28 Oct 2021 21:42:49 +0200 Subject: [PATCH] sdgui: fix M-0 going one item beyond our intent --- src/sdgui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdgui.c b/src/sdgui.c index 0e69ff0..9589fa9 100644 --- a/src/sdgui.c +++ b/src/sdgui.c @@ -214,7 +214,7 @@ on_key_press (G_GNUC_UNUSED GtkWidget *widget, GdkEvent *event, && event->key.keyval <= GDK_KEY_9) { gint n = event->key.keyval - GDK_KEY_0; - gtk_notebook_set_current_page (notebook, n ? (n - 1) : 10); + gtk_notebook_set_current_page (notebook, (n ? n : 10) - 1); return TRUE; } }