about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.codespellrc5
-rw-r--r--src/command/cmd_ac.c16
-rw-r--r--src/log.c2
-rw-r--r--src/xmpp/vcard.c2
-rw-r--r--tests/unittests/test_parser.c4
5 files changed, 24 insertions, 5 deletions
diff --git a/.codespellrc b/.codespellrc
index 530d70c6..6f22a81a 100644
--- a/.codespellrc
+++ b/.codespellrc
@@ -1,2 +1,5 @@
 [codespell]
-skip = libtool,./autom4te.cache/*,*.html,./build-aux/*,./.git/*,aclocal*,./m4/*,./config.status,./configure,./config.log,todo
+skip = libtool,./autom4te.cache/*,*.html,./build-aux/*,./.git/*,aclocal*,./m4/*,./config.status,./configure,./config.log,todo,jquery.js,*~
+ignore-words-list = iterm
+ignore-regex = \"Hel\"|ist ein|\->fpr
+uri-ignore-words-list = *
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index 0fc8f224..8654a07b 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -101,6 +101,7 @@ static char* _wintitle_autocomplete(ProfWin* window, const char* const input, gb
 static char* _inpblock_autocomplete(ProfWin* window, const char* const input, gboolean previous);
 static char* _time_autocomplete(ProfWin* window, const char* const input, gboolean previous);
 static char* _receipts_autocomplete(ProfWin* window, const char* const input, gboolean previous);
+static char* _reconnect_autocomplete(ProfWin* window, const char* const input, gboolean previous);
 static char* _help_autocomplete(ProfWin* window, const char* const input, gboolean previous);
 static char* _wins_autocomplete(ProfWin* window, const char* const input, gboolean previous);
 static char* _tls_autocomplete(ProfWin* window, const char* const input, gboolean previous);
@@ -232,6 +233,7 @@ static Autocomplete time_format_ac;
 static Autocomplete resource_ac;
 static Autocomplete inpblock_ac;
 static Autocomplete receipts_ac;
+static Autocomplete reconnect_ac;
 #ifdef HAVE_LIBGPGME
 static Autocomplete pgp_ac;
 static Autocomplete pgp_log_ac;
@@ -886,6 +888,9 @@ cmd_ac_init(void)
     autocomplete_add(receipts_ac, "send");
     autocomplete_add(receipts_ac, "request");
 
+    reconnect_ac = autocomplete_new();
+    autocomplete_add(reconnect_ac, "now");
+
 #ifdef HAVE_LIBGPGME
     pgp_ac = autocomplete_new();
     autocomplete_add(pgp_ac, "keys");
@@ -1573,6 +1578,7 @@ cmd_ac_reset(ProfWin* window)
     autocomplete_reset(resource_ac);
     autocomplete_reset(inpblock_ac);
     autocomplete_reset(receipts_ac);
+    autocomplete_reset(reconnect_ac);
 #ifdef HAVE_LIBGPGME
     autocomplete_reset(pgp_ac);
     autocomplete_reset(pgp_log_ac);
@@ -1752,6 +1758,7 @@ cmd_ac_uninit(void)
     autocomplete_free(resource_ac);
     autocomplete_free(inpblock_ac);
     autocomplete_free(receipts_ac);
+    autocomplete_free(reconnect_ac);
 #ifdef HAVE_LIBGPGME
     autocomplete_free(pgp_ac);
     autocomplete_free(pgp_log_ac);
@@ -2048,6 +2055,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
     g_hash_table_insert(ac_funcs, "/inpblock", _inpblock_autocomplete);
     g_hash_table_insert(ac_funcs, "/time", _time_autocomplete);
     g_hash_table_insert(ac_funcs, "/receipts", _receipts_autocomplete);
+    g_hash_table_insert(ac_funcs, "/reconnect", _reconnect_autocomplete);
     g_hash_table_insert(ac_funcs, "/wins", _wins_autocomplete);
     g_hash_table_insert(ac_funcs, "/tls", _tls_autocomplete);
     g_hash_table_insert(ac_funcs, "/titlebar", _titlebar_autocomplete);
@@ -3551,6 +3559,14 @@ _receipts_autocomplete(ProfWin* window, const char* const input, gboolean previo
 }
 
 static char*
+_reconnect_autocomplete(ProfWin* window, const char* const input, gboolean previous)
+{
+    char* result = NULL;
+    result = autocomplete_param_with_ac(input, "/reconnect", reconnect_ac, TRUE, previous);
+    return result;
+}
+
+static char*
 _alias_autocomplete(ProfWin* window, const char* const input, gboolean previous)
 {
     char* result = NULL;
diff --git a/src/log.c b/src/log.c
index a1b7bb1d..f2537675 100644
--- a/src/log.c
+++ b/src/log.c
@@ -105,7 +105,7 @@ _rotate_log_file(void)
     log_info("Log has been rotated");
 }
 
-// abbreviation string is the prefix thats used in the log file
+// abbreviation string is the prefix that's used in the log file
 static char*
 _log_abbreviation_string_from_level(log_level_t level)
 {
diff --git a/src/xmpp/vcard.c b/src/xmpp/vcard.c
index 6d2f0b1e..b3ff5d39 100644
--- a/src/xmpp/vcard.c
+++ b/src/xmpp/vcard.c
@@ -297,7 +297,7 @@ vcard_parse(xmpp_stanza_t* vcard_xml, vCard* vcard)
             element->nickname = stanza_text_strdup(child_pointer);
 
             if (!element->nickname) {
-                // Invaild element, free and do not push
+                // Invalid element, free and do not push
                 free(element);
                 continue;
             }
diff --git a/tests/unittests/test_parser.c b/tests/unittests/test_parser.c
index 96143294..3d0d3fc6 100644
--- a/tests/unittests/test_parser.c
+++ b/tests/unittests/test_parser.c
@@ -274,7 +274,7 @@ parse_cmd_with_many_quoted_and_many_spaces(void** state)
 void
 parse_cmd_freetext_with_quoted(void** state)
 {
-    char* inp = "/cmd \"arg1\" arg2 hello there whats up";
+    char* inp = "/cmd \"arg1\" arg2 hello there what's up";
     gboolean result = FALSE;
     gchar** args = parse_args_with_freetext(inp, 3, 3, &result);
 
@@ -282,7 +282,7 @@ parse_cmd_freetext_with_quoted(void** state)
     assert_int_equal(3, g_strv_length(args));
     assert_string_equal("arg1", args[0]);
     assert_string_equal("arg2", args[1]);
-    assert_string_equal("hello there whats up", args[2]);
+    assert_string_equal("hello there what's up", args[2]);
     g_strfreev(args);
 }