News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

All code editor views seem to be fixed width

Started by mimi89999, April 03, 2020, 01:55:15 PM

Previous topic - Next topic

mimi89999

All code editor views seem to be fixed width. In the code editor or any other view with scintilla like _Syntax highlighting_ settings there is a horizontal scrollbar and I can see that the width of the editor is much larger that what would be required to fit the longest line of code. If I open a file with a very long line, it gets cropped and the view width stays the same.

I have this issue on trunk on Debian 10 with GTK3 and in 20.03 on Windows 10, so it doesn't seem to be platform dependent.

BlueHazzard


BlueHazzard

What if you enable word wrap?
Settings->Editor->General settings->Other editor settings->Word wrap

Can you post a screenshot?

mimi89999

With Word wrap enable I don't have this issue. I will fire a VM and check Notepad++.


BlueHazzard

ok, i can see the first also here..
but for me all characters are displayed, so it does seem that only the bar is displayed wrongly, but no characters missing. Can you confirm this?

mimi89999

I didn't count the `s`, but you can see on https://lebihan.pl/files/Screenshot_win10_2020-04-03_15:24:01.png that the closing double quote and semicolon are missing. You can see them in https://lebihan.pl/files/Screenshot_win10_2020-04-03_15:24:26.png.

The issue doesn't appear until you close Code::Blocks. You need to create a new file, write a long line, save the file, exit C::B, open C::B and open the file again. The line will be cropped.

I tried SciTE and couldn't reproduce.

Note that Notepad++ is using Scintilla 4.2.x and C::B 3.7.5 (https://sourceforge.net/p/codeblocks/code/HEAD/tree/trunk/src/sdk/wxscintilla/src/scintilla/version.txt)

mimi89999



mimi89999

The window is still too wide, but at least the view grows when a file with a long line is open.


BlueHazzard

Ok, i see and i can reproduce this:

1) Create a new file
2) Create a long line within this file (lets say at least 2000 characters...
3) Save the file
4) Close the file
5) Open the file again
6) The scroll bar will not be updated and display a default with. If you use the scroll bar to go to the end of the line it will crop of. You still can use the arrow keys to go to the end.
Also using the end key works...



To circumvent this bug, you can select the line and press the "end" key on the keyboard. This will bring you to the end of the line, and will update the scrollbar...

BlueHazzard


mimi89999

It's actually a feature. It's controlled by the `scroll_width_tracking` setting variable. The setting can be found in settings -> editor configuration -> margins and caret -> scrollbar: Automatically [...]

It's a Scintilla setting. It's explained in: https://www.scintilla.org/ScintillaDoc.html#SCI_SETSCROLLWIDTHTRACKING

I think that the default should be changed to true.

oBFusCATed

(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!]