projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
580b343
)
ESC deselects
author
Benjamin Petrenko
<benjamin.petrenko@gmail.com>
Sat, 18 Jul 2015 07:48:32 +0000
(10:48 +0300)
committer
Benjamin Petrenko
<benjamin.petrenko@gmail.com>
Sat, 18 Jul 2015 07:48:32 +0000
(10:48 +0300)
src/normal.c
patch
|
blob
|
history
diff --git
a/src/normal.c
b/src/normal.c
index
f1f1be8
..
9d11c26
100644
(file)
--- a/
src/normal.c
+++ b/
src/normal.c
@@
-336,6
+336,14
@@
VbResult pass_keypress(int key)
static VbResult normal_clear_input(const NormalCmdInfo *info)
{
+ /* if there's a text selection, deselect it */
+ char *clipboard_text = gtk_clipboard_wait_for_text(PRIMARY_CLIPBOARD());
+ gtk_clipboard_clear(PRIMARY_CLIPBOARD());
+ if (clipboard_text) {
+ gtk_clipboard_set_text(PRIMARY_CLIPBOARD(), clipboard_text, -1);
+ }
+ g_free(clipboard_text);
+
gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview));
vb_echo(VB_MSG_NORMAL, false, "");
command_search(&((Arg){0}));