Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: danh on June 22, 2010, 12:38:44 pm

Title: Extra horizontal blank space in the editor?
Post by: danh on June 22, 2010, 12:38:44 pm
Hi all,

I was wondering if there is some way to remove the extra blank space to the right of the last character in the composition frame of the editor.  For example, I try to keep my lines under 80 characters long.  However, there's probably about 250 characters worth of empty space beyond my longest line (and yes, I turned on invisible characters to make sure I didn't have a long line of whitespace!).

I thought that the "Automatically determine the width of the horizontal scrollbar" might be what I was looking for, but this appears to do nothing in all the documents I've looked at.

In an ideal composition pane, I would be using the size of the horizontal scrollbar to gauge how badly a particular file is breaking my 80 character convention.  Any ideas?

Thanks!
Title: Re: Extra horizontal blank space in the editor?
Post by: oBFusCATed on June 22, 2010, 12:44:18 pm
Do you see the same problem in sCiTe or any other editor based on Scintilla?
Title: Re: Extra horizontal blank space in the editor?
Post by: danh on June 22, 2010, 12:50:50 pm
I just installed SciTE to check and, yes, I am seeing a (probably) identical issue there.
Title: Re: Extra horizontal blank space in the editor?
Post by: oBFusCATed on June 22, 2010, 01:43:52 pm
If the issue is the same in scite, you should talk to the scintilla people.

Codeblocks uses wxScintilla for the editor, which uses or it is based on the scintilla component.
Title: Re: Extra horizontal blank space in the editor?
Post by: danh on June 23, 2010, 10:21:00 am
Okay, I will do that.  Thanks.

Out of curiosity, though, since I'm assuming this is not the intended behavior, what is the intended behavior?
Title: Re: Extra horizontal blank space in the editor?
Post by: Jenna on June 23, 2010, 04:34:57 pm
It would be no problem to set the default ScrollWidth to something less than it is now, but this would cut longer lines if "Automatically determine the width of the horizontal scrollbar" is not set (unless the user moves the caret to the last position via keyboard).

It's possible to make the initial ScrollWidth configurable, but I'm not sure if this is really needed (we already have very much configure options).
Title: Re: Extra horizontal blank space in the editor?
Post by: danh on June 23, 2010, 04:41:59 pm
I'm a little confused again.  You haven't said this explicitly, jens, but it sounds like the behavior I'm seeing is *not* a bug, and is in fact the intended behavior.  Is this correct?
Title: Re: Extra horizontal blank space in the editor?
Post by: oBFusCATed on June 23, 2010, 04:49:29 pm
Probably, yes.
And Prabably "Automatically determine the width of the horizontal scrollbar" is off by default to improve the performance of the editor.

Jens, Am I right?
Title: Re: Extra horizontal blank space in the editor?
Post by: Jenna on June 23, 2010, 05:00:59 pm
Yes and no.
The default ScrollWidth, set in scintillas Editor.cxx:146 is 2000 (I guess pixels, but I am not sure about that).

But it's intended, that we do not change it, because almost every text fits into it.
Making it configurable can be an option, but should be discussed,  but I did not find an option to use a character count as ScrollWidth, just the pixels (or whatever it is).

Because of users having very long lines I added the "Automatically determine ..." stuff.
Title: Re: Extra horizontal blank space in the editor?
Post by: vid512 on February 24, 2014, 10:04:55 pm
Ressurecting this topic, because I got the same misconception as original poster. Maybe the "Automatically determine the width of the horizontal scrollbar" should be renamed to "Automatically expand the width of the horizontal scrollbar", in order to make it clear that this option won't shrink the width below the default?