1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 01:33:02 +01:00

Fix bug preventing the /clear command from working in Home window

This commit is contained in:
jfreegman 2021-01-23 21:17:46 -05:00
parent a5246bcbc6
commit f643975941
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -286,7 +286,10 @@ static bool prompt_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
if (wcs_to_mbs_buf(line, ctx->line, MAX_STR_SIZE) == -1) { if (wcs_to_mbs_buf(line, ctx->line, MAX_STR_SIZE) == -1) {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, RED, " * Failed to parse message."); line_info_add(self, false, NULL, NULL, SYS_MSG, 0, RED, " * Failed to parse message.");
} else { } else {
line_info_add(self, false, NULL, NULL, PROMPT, 0, 0, "%s", line); if (strcmp(line, "/clear") != 0) {
line_info_add(self, false, NULL, NULL, PROMPT, 0, 0, "%s", line);
}
execute(ctx->history, self, m, line, GLOBAL_COMMAND_MODE); execute(ctx->history, self, m, line, GLOBAL_COMMAND_MODE);
} }
} }