diff options
author | MarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com> | 2022-03-21 00:10:07 +0200 |
---|---|---|
committer | MarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com> | 2022-03-21 13:46:50 +0200 |
commit | 06ef6842e8ff6b7a754c54f4af39775bc842612b (patch) | |
tree | b811ac7e13551c8ca9fbfc072a2e7a5fc37acf34 /src/ui/mucwin.c | |
parent | 09e7f63c790089acfe1fd39f686597891cada5a7 (diff) | |
download | profani-tty-06ef6842e8ff6b7a754c54f4af39775bc842612b.tar.gz |
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.
Diffstat (limited to 'src/ui/mucwin.c')
-rw-r--r-- | src/ui/mucwin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 5bf21722..c5aed583 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -541,6 +541,8 @@ mucwin_outgoing_msg(ProfMucWin* mucwin, const char* const message, const char* c if (id) { _mucwin_set_last_message(mucwin, id, message); } + + wins_add_quotes_ac(window, message); } void @@ -576,6 +578,7 @@ mucwin_incoming_msg(ProfMucWin* mucwin, const ProfMessage* const message, GSList win_insert_last_read_position_marker((ProfWin*)mucwin, mucwin->roomjid); wins_add_urls_ac(window, message); + wins_add_quotes_ac(window, message->plain); if (g_slist_length(mentions) > 0) { _mucwin_print_mention(window, message->plain, message->from_jid->resourcepart, mynick, mentions, ch, flags); |