From ed26259e6dba4600c8d4ad0423e3e700312ab4be Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Thu, 28 Oct 2021 21:42:49 +0200 Subject: sdgui: fix M-0 going one item beyond our intent --- src/sdgui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sdgui.c') 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; } } -- cgit v1.2.3-70-g09d2