1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

core: fix partial completion when the common prefix found is empty (closes #340)

This commit is contained in:
Sébastien Helleu
2023-05-16 19:45:12 +02:00
parent 357323b8fc
commit 17f3687e28
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -55,6 +55,7 @@ New features::
Bug fixes::
* core: fix completion after newline in input (issue #1925)
* core: fix partial completion when the common prefix found is empty (issue #340)
* core: display a specific error when trying to bind a key without area in mouse context
* core: fix display of key with command `/key bindctxt <context> <key>`
* core: fix default value of bar options (issue #846)
+8
View File
@@ -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)
{