aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-18 12:11:55 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-18 12:11:55 +0300
commit941f48da6dde691a7800290cc729aaaacd051392 (patch)
tree1191a175e4c2f88f7a926413c6ed455d1f803d24 /src/doc.c
parentf0d57d7676e2fed234a10d93f2737209e8007c2c (diff)
downloadsciteco-941f48da6dde691a7800290cc729aaaacd051392.tar.gz
no longer try to avoid automatic scrolling - this is patched out of Scintilla now
* The patch avoids all automatic scrolling consistently, including in SCI_UNDO. This speads up Undo (especially after interruptions). * Also, the patch disables a very costly and pointless (in SciTECO) algorithm that effectively made <Ix$> uninterruptible. * Effectively reverts large parts of 8ef010da59743fcc4927c790f585ba414ec7b129. I have never liked using unintuitive Scintilla messages to avoid scrolling.
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/doc.c b/src/doc.c
index 2c56a64..a69896c 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -45,8 +45,7 @@ teco_doc_edit(teco_doc_t *ctx)
(sptr_t)teco_doc_get_scintilla(ctx));
teco_view_ssm(teco_qreg_view, SCI_SETFIRSTVISIBLELINE, ctx->first_line, 0);
teco_view_ssm(teco_qreg_view, SCI_SETXOFFSET, ctx->xoffset, 0);
- teco_view_ssm(teco_qreg_view, SCI_SETSELECTIONSTART, ctx->anchor, 0);
- teco_view_ssm(teco_qreg_view, SCI_SETSELECTIONEND, ctx->dot, 0);
+ teco_view_ssm(teco_qreg_view, SCI_SETSEL, ctx->anchor, (sptr_t)ctx->dot);
/*
* NOTE: Thanks to a custom Scintilla patch, se representations
@@ -65,8 +64,7 @@ teco_doc_undo_edit(teco_doc_t *ctx)
*/
//undo__teco_view_set_representations(teco_qreg_view);
- undo__teco_view_ssm(teco_qreg_view, SCI_SETSELECTIONEND, ctx->dot, 0);
- undo__teco_view_ssm(teco_qreg_view, SCI_SETSELECTIONSTART, ctx->anchor, 0);
+ undo__teco_view_ssm(teco_qreg_view, SCI_SETSEL, ctx->anchor, (sptr_t)ctx->dot);
undo__teco_view_ssm(teco_qreg_view, SCI_SETXOFFSET, ctx->xoffset, 0);
undo__teco_view_ssm(teco_qreg_view, SCI_SETFIRSTVISIBLELINE, ctx->first_line, 0);
undo__teco_view_ssm(teco_qreg_view, SCI_SETDOCPOINTER, 0,