From 9249657441df18630dbcb71b212d36af9a346c4e Mon Sep 17 00:00:00 2001 From: mbkma Date: Wed, 23 Dec 2020 16:31:39 +0100 Subject: add show/hide line-numbers shortcut (ctrl+y) --- help/C/index.docbook | 30 ++++++++++++++++++++++++++++++ pluma/pluma-window.c | 4 ++++ 2 files changed, 34 insertions(+) diff --git a/help/C/index.docbook b/help/C/index.docbook index 5961f617..201a6620 100644 --- a/help/C/index.docbook +++ b/help/C/index.docbook @@ -1320,6 +1320,36 @@ + + View + Shortcuts for the current view: + + + + + + + + Shortcut Key + + + Command + + + + + + + Ctrl + Y + + + Show/hide line numbers. + + + + + + Panes Shortcuts for showing and hiding panes: diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index fae01e60..58d3fcf7 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -348,6 +348,10 @@ pluma_window_key_press_event (GtkWidget *widget, g_free (tmp); } } + else if (event->keyval == GDK_KEY_y) + { + g_settings_set_boolean (settings, PLUMA_SETTINGS_DISPLAY_LINE_NUMBERS, !g_settings_get_boolean (settings, PLUMA_SETTINGS_DISPLAY_LINE_NUMBERS)); + } if (g_settings_get_boolean (settings, PLUMA_SETTINGS_CTRL_TABS_SWITCH_TABS)) { -- cgit v1.2.1