Code::Blocks

User forums => Help => Topic started by: visir on December 18, 2017, 07:42:48 pm

Title: How to center text? (always show text ahead)
Post by: visir on December 18, 2017, 07:42:48 pm
When I'm using arrow keys to scroll through source code, cursor is at the very bottom of the "text subwindow". I don't see ahead.

I'd like for codeblocks to always show 3 lines ahead of cursor (or more). In emacs, I do this with "(setq scroll-margin 4)".
Title: Re: How to center text? (always show text ahead)
Post by: jens on December 18, 2017, 08:18:30 pm
If you have the EditorTweaks-plugin installed (on linux you need the codeblocks-contrib package), you can go change "Settings -> Editor -> Editor Tweaks -> Editor caret buffer".
Title: Re: How to center text? (always show text ahead)
Post by: visir on December 19, 2017, 06:49:41 am
Doesn't work with debugger. Doesn't center when I'm stepping through code.

What should I change in the source code, where I should look? I have it compiled here.
Title: Re: How to center text? (always show text ahead)
Post by: oBFusCATed on December 19, 2017, 10:12:14 am
Look at cbDebuggerPlugin::SyncEditor and cbEditor::GotoLine.

I guess it will be a good idea to move the editor tweak setting in the core so it could be respected in more places.
Title: Re: How to center text? (always show text ahead)
Post by: oBFusCATed on February 17, 2018, 12:47:53 am
Implemented in rev11296... Thanks for reporting...