diff options
Diffstat (limited to 'src/gui/gui-common.c')
-rw-r--r-- | src/gui/gui-common.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c index d15ae2e29..424ae94e7 100644 --- a/src/gui/gui-common.c +++ b/src/gui/gui-common.c @@ -628,13 +628,16 @@ gui_input_complete (t_gui_window *window) if ((window->buffer->completion.context == COMPLETION_COMMAND) || (window->buffer->completion.context == COMPLETION_COMMAND_ARG)) { - if (window->buffer->input_buffer[utf8_real_pos (window->buffer->input_buffer, - window->buffer->input_buffer_pos)] != ' ') - gui_insert_string_input (window, " ", - window->buffer->input_buffer_pos); - if (window->buffer->completion.position >= 0) - window->buffer->completion.position++; - window->buffer->input_buffer_pos++; + if (window->buffer->completion.add_space) + { + if (window->buffer->input_buffer[utf8_real_pos (window->buffer->input_buffer, + window->buffer->input_buffer_pos)] != ' ') + gui_insert_string_input (window, " ", + window->buffer->input_buffer_pos); + if (window->buffer->completion.position >= 0) + window->buffer->completion.position++; + window->buffer->input_buffer_pos++; + } } else { |