about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 54932f21..516e2209 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -2020,3 +2020,26 @@ win_insert_last_read_position_marker(ProfWin* window, char* id)
 
     g_date_time_unref(time);
 }
+
+char*
+win_quote_autocomplete(ProfWin* window, const char* const input, gboolean previous)
+{
+    if (window->type != WIN_CHAT && window->type != WIN_MUC && window->type != WIN_PRIVATE) {
+        return NULL;
+    }
+
+    char* result = autocomplete_complete(window->quotes_ac, input + 1, FALSE, previous);
+    if (result == NULL) {
+        return NULL;
+    }
+
+    GString* replace_with = g_string_new("> ");
+    g_string_append(replace_with, result);
+    g_string_replace(replace_with, "\n", "\n> ", 0);
+    g_string_append(replace_with, "\n");
+
+    g_free(result);
+    result = replace_with->str;
+    g_string_free(replace_with, FALSE);
+    return result;
+}
ref='/acidbong/suckless/dwm/commit/README?h=2.9&id=650a1fb4e1a798aca48a53739f5bb2649191bc1c'>650a1fb ^
01a8d44 ^
650a1fb ^
1076f2b
650a1fb ^
1076f2b
650a1fb ^
1076f2b

650a1fb ^
1076f2b
650a1fb ^
1076f2b

98c6a92 ^




98c6a92 ^



2b66f7a ^
98c6a92 ^
1076f2b

ed41473 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50