if (map.timout_id) {
g_source_remove(map.timout_id);
}
- map.timout_id = g_timeout_add(1000, (GSourceFunc)map_timeout, NULL);
+ map.timout_id = g_timeout_add(vb.config.timeoutlen, (GSourceFunc)map_timeout, NULL);
}
/* copy the keys onto the end of queue */
static gboolean user_style(const Setting *s, const SettingType type);
static gboolean history_max_items(const Setting *s, const SettingType type);
static gboolean editor_command(const Setting *s, const SettingType type);
+static gboolean timeoutlen(const Setting *s, const SettingType type);
static Setting default_settings[] = {
/* webkit settings */
{NULL, "status-sslinvalid-color-bg", TYPE_COLOR, status_color_bg, {0}},
{NULL, "status-sslinvalid-color-fg", TYPE_COLOR, status_color_fg, {0}},
{NULL, "status-sslinvalid-font", TYPE_FONT, status_font, {0}},
+ {NULL, "timeoutlen", TYPE_INTEGER, timeoutlen, {0}},
{NULL, "input-bg-normal", TYPE_COLOR, input_style, {0}},
{NULL, "input-bg-error", TYPE_COLOR, input_style, {0}},
{NULL, "input-fg-normal", TYPE_COLOR, input_style, {0}},
return true;
}
+
+static gboolean timeoutlen(const Setting *s, const SettingType type)
+{
+ if (type == SETTING_GET) {
+ print_value(s, &vb.config.timeoutlen);
+ } else {
+ vb.config.timeoutlen = abs(s->arg.i);
+ }
+
+ return true;
+}