Author Topic: Extra horizontal blank space in the editor?  (Read 5015 times)

Offline danh

  • Multiple posting newcomer
  • *
  • Posts: 11
Extra horizontal blank space in the editor?
« 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Extra horizontal blank space in the editor?
« Reply #1 on: June 22, 2010, 12:44:18 pm »
Do you see the same problem in sCiTe or any other editor based on Scintilla?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline danh

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Extra horizontal blank space in the editor?
« Reply #2 on: June 22, 2010, 12:50:50 pm »
I just installed SciTE to check and, yes, I am seeing a (probably) identical issue there.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Extra horizontal blank space in the editor?
« Reply #3 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline danh

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Extra horizontal blank space in the editor?
« Reply #4 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?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Extra horizontal blank space in the editor?
« Reply #5 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).

Offline danh

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Extra horizontal blank space in the editor?
« Reply #6 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Extra horizontal blank space in the editor?
« Reply #7 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?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Extra horizontal blank space in the editor?
« Reply #8 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.

Offline vid512

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: Extra horizontal blank space in the editor?
« Reply #9 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?