From 38ae2e440127137c57a2d782cecffc3ce5e19804 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 2 Mar 2025 02:36:10 +0300 Subject: 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. --- TODO | 3 --- 1 file changed, 3 deletions(-) (limited to 'TODO') diff --git a/TODO b/TODO index d297e1b..08b195c 100644 --- a/TODO +++ b/TODO @@ -4,9 +4,6 @@ Tasks: "edit" hook. Known Bugs: - * ?^E$ does not scroll automatically on GTK. - This is apparently since the buffer is newly added to the ring - and the view is not yet realized. * PDCurses/WinGUI: There is still some flickering, but it got better since key macros update the command line only once. Could already be fixed upstream, see: -- cgit v1.2.3