xC: transcode input editor output back
Alpine 3.24 Success
Arch Linux AUR Success
OpenBSD 7.8 Success

This commit is contained in:
2026-07-21 15:38:02 +02:00
parent 6c749be5f7
commit ed6ad5981a
+10 -5
View File
@@ -13973,11 +13973,16 @@ input_editor_process (struct app_context *ctx)
error_free (e);
}
else
input_clear_line (ctx->input);
if (!input_insert (ctx->input, input.str))
log_global_error (ctx, "#s: #s", "Input editing failed",
"could not re-insert the modified text");
{
// Even if it was already in UTF-8, this should verify it.
char *converted = iconv_xstrdup
(ctx->term_to_utf8, input.str, input.len + 1, NULL);
if (!converted)
print_error ("character conversion failed for: %s", "input");
else
input_replace_line (ctx->input, converted);
free (converted);
}
str_free (&input);
}