frontend: line-ed: convert all escape code usage to s_tty calls

This commit is contained in:
2024-11-18 21:13:28 +00:00
parent 5a5b0d01d8
commit c5f60c285e
6 changed files with 106 additions and 18 deletions

View File

@@ -7,7 +7,7 @@ void alloc_empty_history_entry(struct line_ed *ed)
{
b_string *str = (b_string *)b_array_at(
ed->l_history, b_array_size(ed->l_history) - 1);
if (!str || !b_string_get_size(str, B_STRLEN_NORMAL)) {
if (!str || b_string_get_size(str, B_STRLEN_NORMAL) > 0) {
str = b_string_create();
b_array_append(ed->l_history, (b_object *)str);
}