From 17a52d002055142b8f6d860640ac4c6ca095f77c Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 27 Oct 2006 22:45:23 +0000 Subject: Removed automatic space after filename when using completion --- src/gui/gui-common.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/gui') 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 { -- cgit v1.2.3