Author Topic: Cannot adjust erratic Window Left Margin  (Read 667 times)

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Cannot adjust erratic Window Left Margin
« on: May 16, 2018, 12:21:09 am »
In the General Settings I had the Window Left Margin set to 0.01, and it was fine. Then, all of a sudden, the visible Window Left Margin changed to something a few millimeters wide (approx. 5/32 of an inch). The setting itself remains unchanged and even changing it now does not do anything. If I close and restart the editor, the left margin disappears again for a while (with my 0.01 setting). But then, all of a sudden, I think it might be related to doing searches (incremental via ctrl-S or the full featured ones), the margin reappears.

My VS version is (v18.0.1.2 64-bit). My colleague has a later version and sees the same issue. Even a v22 beta version seems to have this issue: https://community.slickedit.com/index.php?topic=15450.0
So there is probably no point to buy an upgrade to have this fixed. Is there any way I can fix this in the editor's .e files?

Cheers,
Siggy

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #1 on: May 16, 2018, 01:05:08 am »
This left margin increases in width when there are bitmaps to be shown in the left margin e.g. bookmarks, errors, breakpoints etc.  You can turn off the display of bookmarks in the margin via options -> editing -> bookmarks  - show set bookmarks and show pushed bookmarks.

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Cannot adjust erratic Window Left Margin
« Reply #2 on: May 16, 2018, 01:19:50 am »
The entire prefix area is dark gray, nothing shown in it. I went ahead and turned these settings off, the vertical gray strip remained, unfortunately. Window left Margin is set to 0.01.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #3 on: May 16, 2018, 02:13:47 am »
When you say "all of a sudden" do you mean it was ok for weeks/ months then went wrong.  If so, try running slick from a new empty config
vs.exe +new -sc c:\some-empty-folder
If it's ok, try export/ import of your settings.
What operating system?
On my PC, the left margin increases to approx 18 pixels wide when there's a bitmap to show.

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Cannot adjust erratic Window Left Margin
« Reply #4 on: May 16, 2018, 04:20:54 am »
With 'all of a sudden' I mean it is caused by some editing action (so maybe a few minutes of editing), but as I do not notice it straight away, I cannot tell what editing action causes it. I think it might be related to searches. I have this currently with one .c file/buffer, but other .c files/buffers seem not to show this. These other buffers, when they are visible, react to modified 'Window Left Margin' values, but the one that already has the gray strip does not. The width of the gray strip seems to be 2 light-gray plus 14 dark-gray pixels, but I do not see anything displayed in it.

(Operating system is Windows 7 64-bit)

Just found out, the gray area is the "line prefix area". When I changed that element's colour the gray strip changed its colour.
« Last Edit: May 16, 2018, 06:16:03 am by Siggy Schwarz »

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Cannot adjust erratic Window Left Margin
« Reply #5 on: May 17, 2018, 05:23:31 am »
Just had this again. It happened when my search (using ctrl-F to find the next occurrence) hit the end of the file and the continuation dialog popped up and I hit 'y' to continue from the top. Then the gray strip on the left hand side appeared. There is no bitmap or whatever in it, it is completely gray.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #6 on: May 17, 2018, 11:23:02 am »
Is it completely random  - does it not happen with every search?
In tools -> options -> editing -> bookmarks, you could try turning off "navigating search results pushes bookmark".
If there's a bookmark anywhere in the file I think you get the wider gutter for the whole file  - so just because there's no bitmap immediately visible doesn't automatically mean the gutter should be narrow.

Is this a new problem or has V18 always had this problem for you?  If it's a new problem, try running slick on a new empty config folder
vs.exe +new -sc c:\some-empty-folder
and maybe export / import your settings.
Another thing you could try is deleting/renaming vrestore.slk - with slick closed  - and back up vrestore.slk first.
Have you tried 0.0 for the gutter width?

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Cannot adjust erratic Window Left Margin
« Reply #7 on: May 18, 2018, 12:05:01 am »
Until my PC was upgraded recently I have mostly used VS version 7. So I cannot say whether this is new. On this new machine I decided to finally switch over to this new version.

No, it does not happen with every search. I only had the feeling that it might be related to searches until I had one case where it noticed the issue directly after hitting 'y' on the 'search wrap/continue' dialog (it still is a little bit a fuzzy observation).

Yes, the Window Left Margin set to 0.0 did not help either.

Strangely, when I tried re-creating this issue just now, using a .h file, the .c file that showed the gray strip, now no longer has the gray strip!

Under tools/options/editing/bookmarks I have all switches set to OFF.

When I installed V18 on the old PC, I let it import/migrate the config from V7. Could that be the problem?
Going back to an empty config and re-applying everything would be a bit tedious.
But then, my colleague, who has I think V19, also has the problem, but he has line numbers on all the time and hence does not notice this. (Checking with my colleague's V19, not all of his editor windows have the extra space after the line numbers).
« Last Edit: May 18, 2018, 05:18:57 am by Siggy Schwarz »

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Cannot adjust erratic Window Left Margin
« Reply #8 on: May 18, 2018, 05:56:22 am »
Just had it again and it seems to have been caused by the editor getting input focus after I minimized by web browser. Saw this before but wasn't sure whether it was caused by a focus change. This issue seems to be random and to me it looks as if there is an uninitialized variable somewhere in the code dealing with this.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #9 on: May 18, 2018, 06:34:50 am »
In my opinion it would be worth trying this
1. export your settings from V18 using the options dialog
2. create a new empty configuration folder by starting slick like this
    vs.exe +new -sc some-empty-folder
3. Run slick on the new config as above.  Cancel out of the "quick setup" dialog.
4. Import your settings using the options dialog.

If you still get the problem and you can reproduce it easily, run slick with a new empty configuration folder and see if you can still repro. it.  If you can, try re-installing slick.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2364
  • Hero Points: 319
Re: Cannot adjust erratic Window Left Margin
« Reply #10 on: May 18, 2018, 03:08:18 pm »
Settings that can put an icon in the left margin:
  • Tools > Options... > Languages > All Languages > Auto-Complete > Visual details > Light bulb
  • Tools > Options... > Editing > Context Tagging(R) > References > Highlight references in editor
  • Tools > Options... > Editing > Bookmarks > Show set bookmarks
  • Tools > Options... > Editing > Bookmarks > Show pushed bookmarks
  • Tools > Options... > Languages > All Languages > Auto-Complete > Syntax Expansion > Use Dynamic Surround
  • Tools > Options... > Languages > All Languages > View > Selective Display on file open

Actions that will put icons in the left margin:
  • Any selective display operation (View > Selective Display... and below)
  • Setting a breakpoint for debugging
  • Error markers, for example navigating using next-error after a compile (Messages tool window)
  • Creating annotations
  • Creating bookmarks
  • Dragging text in the editor
  • Using the integrated debugger

Some of these icons kind of come and go, for example, auto-complete's light-bulb icon.  This is most likely what you are seeing, since you report that the margin width changed and you don't see any icons there afterward.  Once an icon is created in the left margin, we leave it in the wider state.  If we were to shrink it again after the icon went away, then you would see shifting anytime you toggled a single bookmark or breakpoint in a file, as the margin grew and shrunk.

{OPINION}
Coincidently, the features that are associated with icons in the left margin are some of the most valuable features of SlickEdit, so you have to ask yourself if it is worth it to cripple your editor just to save a few pixels.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #11 on: May 18, 2018, 11:53:15 pm »
Quote
Once an icon is created in the left margin, we leave it in the wider state.

This is not true - at least in 22.0.2.  If I clear a bookmark or selective display, the margin goes back to narrow.  It's more likely to be a bug than anything else or he would be able to get the margin back to narrow.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #12 on: May 19, 2018, 07:47:58 am »
The light bulb certainly makes the margin stick in "wide mode" and there's no obvious way to get back to narrow mode.  Personally I don't think the light bulb has any value - I had to use Alt-dot to even get it to appear.  Luckily it can be turned off.  I have auto completion turned off so I never see this.  I don't see how automatically switching the margin back to narrow when there's no more icons there could be a problem, except in the case of the light bulb.

Siggy Schwarz

  • Community Member
  • Posts: 14
  • Hero Points: 1
Re: Cannot adjust erratic Window Left Margin
« Reply #13 on: May 23, 2018, 01:22:49 am »
I don't see any icon at all in the line prefix area that opened up.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 257
Re: Cannot adjust erratic Window Left Margin
« Reply #14 on: May 23, 2018, 06:40:35 am »
Do you mean you can't see a lightbulb icon?
In options ... language -> auto complete  - do you have auto completion enabled?

If it's enabled, do you have "light bulb" ticked under "visual details"?
I couldn't get the light bulb to pop up automatically (using V22.0.2) but it turned up when I used Alt-dot (list symbols).