Add quote autocompletion for previous messages
Fixes https://github.com/profanity-im/profanity/issues/1649 Type `>` then press tab or shift tab to autocomplete previous messages, then type your reply and send message. Newlines are replaced with newline followed by `> `. A newline is added at the end so that the user can immediately type a message without manually adding a new line.
This commit is contained in:
@@ -323,6 +323,7 @@ chatwin_incoming_msg(ProfChatWin* chatwin, ProfMessage* message, gboolean win_cr
|
||||
}
|
||||
|
||||
wins_add_urls_ac(window, message);
|
||||
wins_add_quotes_ac(window, message->plain);
|
||||
|
||||
if (prefs_get_boolean(PREF_BEEP)) {
|
||||
beep();
|
||||
@@ -346,6 +347,9 @@ chatwin_outgoing_msg(ProfChatWin* chatwin, const char* const message, char* id,
|
||||
{
|
||||
assert(chatwin != NULL);
|
||||
|
||||
ProfWin* window = (ProfWin*)chatwin;
|
||||
wins_add_quotes_ac(window, message);
|
||||
|
||||
char* enc_char;
|
||||
if (chatwin->outgoing_char) {
|
||||
enc_char = chatwin->outgoing_char;
|
||||
|
||||
Reference in New Issue
Block a user