From 41ab5cf0289dab60ac1ddc97cf9680ee2468ea6c Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 9 Sep 2024 00:03:33 +0200 Subject: Xq and ]q inherit the document encoding from the source document (refs #5) * ^Uq however always sets an UTF8 register as the source is supposed to be a SciTECO macro which is always UTF-8. * :^Uq preserves the register's encoding * teco_doc_set_string() now also sets the encoding * instead of trying to restore the encoding in teco_doc_undo_set_string(), we now swap out the document in a teco_doc_t and pass it to an undo token. * The get_codepage() Q-Reg method has been removed as the same can now be done with teco_doc_get_string() and the get_string() method. --- src/help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/help.c') diff --git a/src/help.c b/src/help.c index ef94336..8364496 100644 --- a/src/help.c +++ b/src/help.c @@ -94,7 +94,7 @@ teco_help_init(GError **error) teco_qreg_t *lib_reg = teco_qreg_table_find(&teco_qreg_table_globals, "$SCITECOPATH", 12); g_assert(lib_reg != NULL); g_auto(teco_string_t) lib_path = {NULL, 0}; - if (!lib_reg->vtable->get_string(lib_reg, &lib_path.data, &lib_path.len, error)) + if (!lib_reg->vtable->get_string(lib_reg, &lib_path.data, &lib_path.len, NULL, error)) return FALSE; /* * FIXME: lib_path may contain null-bytes. -- cgit v1.2.3