diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-03-02 02:36:10 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-03-02 03:48:42 +0300 |
commit | 38ae2e440127137c57a2d782cecffc3ce5e19804 (patch) | |
tree | b415680fe2cedfd5b0f93cff071524f6146a8ad4 /src/core-commands.h | |
parent | 2e601e3c6c27de6625c9b7d5d32177141e25acf6 (diff) | |
download | sciteco-38ae2e440127137c57a2d782cecffc3ce5e19804.tar.gz |
GTK: always scroll caret when window size changes
* The old implementation would scroll only once for the file first opened and too early.
As a result, opening via `sciteco file:number` did not always scroll to the correct position.
Also, `?` would usually not scroll the topic into view.
* Instead, we now always scroll in all views, but only if the size allocation changed.
This ensures, we can still scroll with the mouse wheel.
* Therefore, we have to store the current size allocation per view.
Instead of allocating a separate heap object, I decided to subclass the Scintilla GTK class.
* Some explicit casts are still necessary since teco_view_t is typedefed
to `struct teco_view_t`, but we cannot easily rename the GObject instance structure.
Diffstat (limited to 'src/core-commands.h')
0 files changed, 0 insertions, 0 deletions