> @@ -5169,6 +5170,12 @@ void editor_apply_update_prefs(GeanyEditor *editor)
>       /* virtual space */
>       SSM(sci, SCI_SETVIRTUALSPACEOPTIONS, editor_prefs.show_virtual_space, 
> 0);
>  
> +     /* caret Y policy */
> +     caret_y_policy = CARET_EVEN;
> +     if (editor_prefs.scroll_lines_around_cursor > 0)
> +             caret_y_policy |= CARET_SLOP | CARET_STRICT;

See http://www.scintilla.org/ScintillaDoc.html#SCI_SETYCARETPOLICY for why the 
options are different: if the *caret slop* is set to 0 and `CARET_STRICT` is 
set, it would keep the caret centered, which is not what we want.  So use 
Scintilla's default unless we set the *caret slop* to something non-zero, in 
which case these additional flags keep it working the same, but adding an 
*unwanted zone* near the top and bottom edges.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1154/files/4ad652aa7d3179dc6da1dcd077d11b21cc5ca0cb#r72798342

Reply via email to