Recent

Author Topic: [Solved] IDE indent  (Read 450 times)

What I can do

  • Full Member
  • ***
  • Posts: 183
[Solved] IDE indent
« on: September 15, 2025, 07:04:05 pm »
FPC 3.2.2 With Lazarus 4.0
Problem: open any project and the IDE display is always left margin  shifted 3 spaces inward so my visual code is cut off from view. its a simple fix by just [Home] key which moves the cursor to the front of the line. Where is that setting in the IDE so that it always aligns correct upon open. The crazy part is it's not a constant I can open project and its shifted off view, so I set then close and reopen and its perfect but do work and bounce to  a unit code and sometimes its shifted but sometimes not. Then close the app and for some unknow point of time open project and its shifted.
Please don't be frustrated sometimes the engineers get frustrated because it's more like baby sitting. I don't mind doing research and attempt to use ChatGPT but that only run me in circles so I just accepted it as normal but after six months of fighting the IDE. I am turning back here to see if anyone is willing to give some advise.   
« Last Edit: September 15, 2025, 09:46:28 pm by What I can do »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12014
  • Debugger - SynEdit - and more
    • wiki
Re: IDE indent
« Reply #1 on: September 15, 2025, 08:01:23 pm »
To summarize, to avoid misunderstanding: Your project(s) open with the horizontal scrollbar (of the source editor) being scrolled. (Hence you are missing several chars at the left of each line)?



There isn't such a setting, i.e., nothing that matches your description.
There is definitely no setting for a "default scroll".

There are several things that may be related (but I can't tell if they causing this for you).

1)
The position of the horizontal scrollbar is saved in the project session. (same as vertical scroll, and caret/cursor pos / selection...).

This position is restored when a file is opened again. That can be when the file is opened while the IDE starts up, or when you open the project.
But this can also be, if you open a specific file (e.g. via file > open) and that file had been open before (as part of the current project).

Modify the project after you did reset scrolling, make sure the project (and with it its session) get saved, and see if it keeps happening for that project.

2)
The caret pos (and selection) is restored.
If the width of the source editor has changed, then that could force scrolling. Actually, I am not sure... The saved ones should have precedence.
But maybe if some extra installed package changes the size of the source edit... Yet, I wouldn't know any that does.

Anyway, for that to be possible the cursor would have close to the right border of the editor (before you press Home or move it by any means).



If you have more than one source tab: Does it happen to all of them? Or just to the one that is active/visible when the project is opened?


What I can do

  • Full Member
  • ***
  • Posts: 183
Re: IDE indent
« Reply #2 on: September 15, 2025, 09:45:15 pm »
Thank you ,  Martin_fr
so basically just set everything to the Home position before saving. Well duh, that makes sense. I never had this problem with version 3.8 but the new ver 4.0 has the new lock tab option that I really enjoy. I will make sure all the layouts are at far left and if something once in a while goes right then no big deal. I had a few lines that go off the right margin and think that is why the "works sometimes" is picking that up. Since 4.0 with docking tabs I have to pay attention to the display width, that's it.
When I am too close to the painting all I see is dots.
Thank you again
« Last Edit: September 15, 2025, 09:50:06 pm by What I can do »

 

TinyPortal © 2005-2018