diff options
Diffstat (limited to 'libraries/libfm/patches/0002-3582816-If-no-region-is-selected-in-editable-then-ap.patch')
-rw-r--r-- | libraries/libfm/patches/0002-3582816-If-no-region-is-selected-in-editable-then-ap.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libraries/libfm/patches/0002-3582816-If-no-region-is-selected-in-editable-then-ap.patch b/libraries/libfm/patches/0002-3582816-If-no-region-is-selected-in-editable-then-ap.patch new file mode 100644 index 0000000000..ce7eb20b08 --- /dev/null +++ b/libraries/libfm/patches/0002-3582816-If-no-region-is-selected-in-editable-then-ap.patch @@ -0,0 +1,33 @@ +From 74901d717fefaf239bf7d8b6f5b14ea146170663 Mon Sep 17 00:00:00 2001 +From: Andriy Grytsenko <andrej@rep.kiev.ua> +Date: Sat, 3 Nov 2012 16:05:31 +0200 +Subject: [PATCH 02/22] [#3582816]If no region is selected in editable then + apply 'Delete' to char next to cursor. + +--- + src/gtk/fm-folder-view.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/gtk/fm-folder-view.c b/src/gtk/fm-folder-view.c +index 153ed48..fe65e9f 100644 +--- a/src/gtk/fm-folder-view.c ++++ b/src/gtk/fm-folder-view.c +@@ -1001,7 +1001,15 @@ static void on_trash(GtkAction* act, FmFolderView* fv) + } + } + else if(GTK_IS_EDITABLE(focus)) /* fallback for editables */ ++ { ++ if(!gtk_editable_get_selection_bounds((GtkEditable*)focus, NULL, NULL)) ++ { ++ gint pos = gtk_editable_get_position((GtkEditable*)focus); ++ /* if no text selected then delete character next to cursor */ ++ gtk_editable_select_region((GtkEditable*)focus, pos, pos + 1); ++ } + gtk_editable_delete_selection((GtkEditable*)focus); ++ } + } + + static void on_rm(GtkAction* act, FmFolderView* fv) +-- +1.8.0.1 + |