aboutsummaryrefslogtreecommitdiff
path: root/src/sdgui.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-28 21:42:49 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-28 21:42:49 +0200
commited26259e6dba4600c8d4ad0423e3e700312ab4be (patch)
tree204f1fb6e6a58a0e9a153aff607b3c84225c7b37 /src/sdgui.c
parent8c80aa9da2623127394cf07c3bda5ef3a5c8b659 (diff)
downloadtdv-ed26259e6dba4600c8d4ad0423e3e700312ab4be.tar.gz
tdv-ed26259e6dba4600c8d4ad0423e3e700312ab4be.tar.xz
tdv-ed26259e6dba4600c8d4ad0423e3e700312ab4be.zip
sdgui: fix M-0 going one item beyond our intent
Diffstat (limited to 'src/sdgui.c')
-rw-r--r--src/sdgui.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}