aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-08-30 04:15:36 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-09 18:22:21 +0200
commit7507ad3e1816f3bc9004dceb39bb303804287438 (patch)
tree3c4b2746b56a0538564dbf0416745012b51228fa /src/doc.c
parent90bad24f96deeaaa2255f0ad89ece21d5397b78b (diff)
downloadsciteco-7507ad3e1816f3bc9004dceb39bb303804287438.tar.gz
Unicode support for the Q-Register commands (refs #5)
* this required adding several Q-Register vtable methods * it should still be investigated whether the repeated calling of SCI_ALLOCATELINECHARACTERINDEX causes any overhead.
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doc.c b/src/doc.c
index fb0661e..0360b43 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -53,6 +53,16 @@ teco_doc_edit(teco_doc_t *ctx)
* initialized only once.
*/
//teco_view_set_representations(teco_qreg_view);
+
+ /*
+ * Documents are UTF-8 by default and all UTF-8 documents
+ * are expected to have a character index.
+ *
+ * FIXME: This apparently gets reset with every SCI_SETDOCPOINTER.
+ * Does that mean the index needs to be recalculated repeatedly as well?
+ */
+ teco_view_ssm(teco_qreg_view, SCI_ALLOCATELINECHARACTERINDEX,
+ SC_LINECHARACTERINDEX_UTF32, 0);
}
/** @memberof teco_doc_t */