gboolean completion_complete(gboolean back)
{
- const char* input = gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox));
+ const char* input = GET_TEXT();
GList* source = NULL;
if (vb.comps.completions
static gboolean hints_changed_callback(GtkEditable *entry)
{
- const char* text = gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox));
+ const char* text = GET_TEXT();
/* skip hinting prefixes like '.', ',', ';y' ... */
hints_create(text + vb.hints.prefixLength, vb.hints.mode, vb.hints.prefixLength);
/* get the search prefix only on start of history search */
if (!vb.state.history_active) {
- OVERWRITE_STRING(vb.state.history_prefix, gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox)));
+ OVERWRITE_STRING(vb.state.history_prefix, GET_TEXT());
/* generate new history list with the matching items */
for (GList* l = vb.behave.history; l; l = l->next) {
}
/* do not free or modify text */
- text = gtk_entry_get_text(entry);
+ text = GET_TEXT();
/* duplicate the content because this may change for example if
* :set varName? is used the text is changed to the new printed
#define TIMER_END
#endif
-#define GET_TEXT() (gtk_entry_get_text(GTK_ENTRY(vp.gui.inputbox)))
+#define GET_TEXT() (gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox)))
#define CLEAN_MODE(mode) ((mode) & ~(VB_MODE_COMPLETE))
#define CLEAR_INPUT() (vb_echo(VB_MSG_NORMAL, ""))
#define PRIMARY_CLIPBOARD() gtk_clipboard_get(GDK_SELECTION_PRIMARY)
}
if (type != SETTING_GET) {
/* vb_update_input_style seems to take no immediatly effect */
- vb_echo(VB_MSG_NORMAL, FALSE, gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox)));
+ vb_echo(VB_MSG_NORMAL, FALSE, GET_TEXT());
}
return TRUE;