aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-09 00:03:33 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-09 18:22:21 +0200
commit41ab5cf0289dab60ac1ddc97cf9680ee2468ea6c (patch)
tree5497c50c7319bd08121afb09d627297ea2b9e17a /src/doc.h
parent850fa38db9063e4bd52fba80588bfd3969ff0910 (diff)
downloadsciteco-41ab5cf0289dab60ac1ddc97cf9680ee2468ea6c.tar.gz
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.
Diffstat (limited to 'src/doc.h')
-rw-r--r--src/doc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc.h b/src/doc.h
index 9dc1665..b7a4f99 100644
--- a/src/doc.h
+++ b/src/doc.h
@@ -65,10 +65,10 @@ teco_doc_init(teco_doc_t *ctx)
void teco_doc_edit(teco_doc_t *ctx);
void teco_doc_undo_edit(teco_doc_t *ctx);
-void teco_doc_set_string(teco_doc_t *ctx, const gchar *str, gsize len);
+void teco_doc_set_string(teco_doc_t *ctx, const gchar *str, gsize len, guint codepage);
void teco_doc_undo_set_string(teco_doc_t *ctx);
-void teco_doc_get_string(teco_doc_t *ctx, gchar **str, gsize *len);
+void teco_doc_get_string(teco_doc_t *ctx, gchar **str, gsize *len, guint *codepage);
void teco_doc_update_from_view(teco_doc_t *ctx, teco_view_t *from);
void teco_doc_update_from_doc(teco_doc_t *ctx, const teco_doc_t *from);