mirror of
https://github.com/weechat/weechat.git
synced 2026-07-08 10:43:13 +02:00
core: fix partial completion when the common prefix found is empty (closes #340)
This commit is contained in:
@@ -416,6 +416,14 @@ gui_input_complete (struct t_gui_buffer *buffer)
|
||||
if (!buffer->completion || !buffer->completion->word_found)
|
||||
return;
|
||||
|
||||
/*
|
||||
* in case the word found is empty, we keep the word in input as-is
|
||||
* (this can happen with partial completion when the common prefix found
|
||||
* is empty)
|
||||
*/
|
||||
if (!buffer->completion->word_found[0])
|
||||
return;
|
||||
|
||||
/* replace word with new completed word into input buffer */
|
||||
if (buffer->completion->diff_size > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user