projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79408ee
)
Observe input change events only in command mode.
author
Daniel Carl
<danielcarl@gmx.de>
Wed, 14 Aug 2013 11:44:52 +0000
(13:44 +0200)
committer
Daniel Carl
<danielcarl@gmx.de>
Wed, 14 Aug 2013 11:44:52 +0000
(13:44 +0200)
src/hints.c
patch
|
blob
|
history
src/main.c
patch
|
blob
|
history
diff --git
a/src/hints.c
b/src/hints.c
index
ab22e2f
..
1a0cce0
100644
(file)
--- a/
src/hints.c
+++ b/
src/hints.c
@@
-219,6
+219,7
@@
static void observe_input(gboolean observe)
}
}
+/* TODO move this event handler to a more generic place in vimb */
static void changed_cb(GtkTextBuffer *buffer)
{
char *text;
diff --git
a/src/main.c
b/src/main.c
index
4c86ff1
..
1d98781
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-155,9
+155,12
@@
static void input_changed_cb(GtkTextBuffer *buffer)
char *text;
GtkTextIter start, end;
gboolean forward;
- if (!gtk_widget_is_focus(GTK_WIDGET(vb.gui.input))) {
- /* if the widget isn't focused the change comes not from the user and
- * we can skip further processing */
+
+ /* if vimb isn't in command mode, all changes are considered as output of
+ * some commands that we don't want here */
+ /* TODO find a better place to only observe the change events in command
+ * mode */
+ if (!(vb.state.mode & VB_MODE_COMMAND)) {
return;
}