diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui-buffer.c | 4 | ||||
-rw-r--r-- | src/gui/gui-completion.c | 4 | ||||
-rw-r--r-- | src/gui/gui-completion.h | 4 | ||||
-rw-r--r-- | src/gui/gui-input.c | 2 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index bb62d3d01..2f8352eb4 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1501,6 +1501,10 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property, (void) gui_hotlist_add (buffer, number, NULL); } } + else if (string_strcasecmp (property, "completion_freeze") == 0) + { + gui_completion_freeze = (strcmp (value, "1") == 0) ? 1 : 0; + } if (!buffer) return; diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 455b9b87c..293f403f7 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -47,6 +47,10 @@ #include "gui-buffer.h" +int gui_completion_freeze = 0; /* 1 to freeze completions (do not */ + /* stop partial completion on key) */ + + /* * Initializes completion for a buffer. */ diff --git a/src/gui/gui-completion.h b/src/gui/gui-completion.h index 1ab6740a6..9dff66399 100644 --- a/src/gui/gui-completion.h +++ b/src/gui/gui-completion.h @@ -63,6 +63,10 @@ struct t_gui_completion struct t_gui_completion_partial *last_partial_completion; }; +/* completion variables */ + +extern int gui_completion_freeze; + /* completion functions */ extern void gui_completion_buffer_init (struct t_gui_completion *completion, diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 82453093e..37afcb8e4 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -162,7 +162,7 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer, } } - if (stop_completion) + if (stop_completion && !gui_completion_freeze) gui_completion_stop (buffer->completion); /* send signal */ |