diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-05-02 07:33:28 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-05-02 11:59:31 +0300 |
commit | 62eb87b149166588d766d5a272e5232ecf86be5d (patch) | |
tree | f959c7812c30ab947a556177813ac836076a02fb /src/interface.h | |
parent | cb1ef4788be0117f57497299ba008652f62cba24 (diff) | |
download | sciteco-62eb87b149166588d766d5a272e5232ecf86be5d.tar.gz |
auto-expand folds even after mouse events
The ^KMOUSE macro can also change dot and it was possible
to place dot into invisible areas at the end of the document.
Diffstat (limited to 'src/interface.h')
-rw-r--r-- | src/interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interface.h b/src/interface.h index 33b094b..b1ad2b8 100644 --- a/src/interface.h +++ b/src/interface.h @@ -93,6 +93,14 @@ teco_interface_ssm(unsigned int iMessage, uptr_t wParam, sptr_t lParam) */ void undo__teco_interface_ssm(unsigned int, uptr_t, sptr_t); +/** Expand folds, so that dot is always visible. */ +static inline void +teco_interface_unfold(void) +{ + sptr_t dot = teco_interface_ssm(SCI_GETCURRENTPOS, 0, 0); + teco_interface_ssm(SCI_ENSUREVISIBLE, teco_interface_ssm(SCI_LINEFROMPOSITION, dot, 0), 0); +} + /** @pure */ void teco_interface_info_update_qreg(const teco_qreg_t *reg); /** @pure */ |