summaryrefslogtreecommitdiff
path: root/src/gui/gui-common.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-10-27 22:45:23 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-10-27 22:45:23 +0000
commit17a52d002055142b8f6d860640ac4c6ca095f77c (patch)
tree3f00b67fd4cbda8ac929a4a09b83b6eb6aeb0251 /src/gui/gui-common.c
parent4dd93fd6d3f01ece7cb9abd7c57caf7654bdd4f7 (diff)
downloadweechat-17a52d002055142b8f6d860640ac4c6ca095f77c.zip
Removed automatic space after filename when using completion
Diffstat (limited to 'src/gui/gui-common.c')
-rw-r--r--src/gui/gui-common.c17
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
{