api: add property "completion_freeze" for function buffer_set: do not stop completion when command line is updated

v2.8-utf8proc
Sebastien Helleu 2013-04-18 20:24:35 +02:00
parent 00c1c81c0b
commit c95f3d84d0
8 changed files with 35 additions and 2 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.1-dev, 2013-04-12
v0.4.1-dev, 2013-04-18
This document lists all changes for each version.
@ -33,6 +33,8 @@ Version 0.4.1 (under dev!)
weechat.history.max_buffer_lines_minutes is set (bug #38197)
* core: use default hash/comparison callback for keys of type
integer/pointer/time in hashtable
* api: add property "completion_freeze" for function buffer_set: do not stop
completion when command line is updated
* api: fix connection to servers with hook_connect on OS X (bug #38496)
* api: fix bug in string_match when mask begins and ends with "*"
* api: allow hashtable with keys that are not strings in function

View File

@ -10202,6 +10202,12 @@ Arguments:
"-": disable hotlist (global setting, buffer pointer is not used) +
priority: add buffer to hotlist with this priority
| completion_freeze | "0", "1" |
"0": no freeze of completion (default value)
(global setting, buffer pointer is not used) +
"1": do not stop completion when command line is updated
(global setting, buffer pointer is not used)
| unread | - |
set unread marker after last line of buffer

View File

@ -10371,6 +10371,12 @@ Paramètres :
pas utilisé) +
priorité : ajouter ce tampon dans la hotlist avec cette priorité
| completion_freeze | "0", "1" |
"0" : pas de gel de la complétion (valeur par défaut)
(option globale, le pointeur vers le tampon n'est pas utilisé) +
"1" : ne pas arrêter la complétion lorsque la ligne de commande est mise à jour
(option globale, le pointeur vers le tampon n'est pas utilisé)
| unread | - |
définit le marqueur de données non lues après la dernière ligne du tampon

View File

@ -10345,6 +10345,13 @@ Argomenti:
utilizzato) +
priorità: aggiunge il buffer alla hotlist con questa proprietà
// TRANSLATION MISSING
| completion_freeze | "0", "1" |
"0": no freeze of completion (default value)
(impostazione globale, il puntatore al buffer non è utilizzato) +
"1": do not stop completion when command line is updated
(impostazione globale, il puntatore al buffer non è utilizzato)
| unread | - |
imposta l'evidenziatore di lettura dopo l'ultima riga del buffer

View File

@ -1501,6 +1501,10 @@ gui_buffer_set (struct t_gui_buffer *buffer, const char *property,
(void) gui_hotlist_add (buffer, number, NULL);
}
}
else if (string_strcasecmp (property, "completion_freeze") == 0)
{
gui_completion_freeze = (strcmp (value, "1") == 0) ? 1 : 0;
}
if (!buffer)
return;

View File

@ -47,6 +47,10 @@
#include "gui-buffer.h"
int gui_completion_freeze = 0; /* 1 to freeze completions (do not */
/* stop partial completion on key) */
/*
* Initializes completion for a buffer.
*/

View File

@ -63,6 +63,10 @@ struct t_gui_completion
struct t_gui_completion_partial *last_partial_completion;
};
/* completion variables */
extern int gui_completion_freeze;
/* completion functions */
extern void gui_completion_buffer_init (struct t_gui_completion *completion,

View File

@ -162,7 +162,7 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
}
}
if (stop_completion)
if (stop_completion && !gui_completion_freeze)
gui_completion_stop (buffer->completion);
/* send signal */