Newly introduced: {} and cursor positioning

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
ajmaske
Posts: 38
Joined: Fri Jun 01, 2007 4:15 am
Location: Modesto, CA
Contact:

Newly introduced: {} and cursor positioning

Post by ajmaske »

Using WeBuilder v9.0.0.94 on XP w/sp2...

In the prior releases to v9.0.0.94 when typing curly "{" then enter the cursor was positioned correctly based on the settings in the "Preferences / Text Editor / General / Tab Size".

In v9.0.0.94 typing a curly "{" then enter positions the cursor "Tab Size x 4" of the setting in the Preferences...

Previously....

Code: Select all

{
     |
}
Now....

Code: Select all

{
                        |
}

Hope this makes sense...

Thanks,

Anthony
Anthony
mwb1100
Posts: 72
Joined: Thu Jun 02, 2005 8:00 am

Re: Newly introduced: {} and cursor positioning

Post by mwb1100 »

I'd guess this has something to do with an attempt to fix the problem in this thread:

http://forums.blumentals.net/viewtopic. ... abs#p10234
.
User avatar
EvilBMP
Posts: 120
Joined: Thu Jan 04, 2007 1:57 am
Location: Germany

Re: Newly introduced: {} and cursor positioning

Post by EvilBMP »

Sure, it has something to do with my post - but the implementation is correct. If you are using TABs insted of spaces to indent you don't need an indent-size of (I think default) 2 or more. You just need 1 - because you want to use TABs and no spaces.

So simply reduce the indent-size to 1 and everything works fine :) I really appreciate this feature!

Thx to the team.
ajmaske
Posts: 38
Joined: Fri Jun 01, 2007 4:15 am
Location: Modesto, CA
Contact:

Re: Newly introduced: {} and cursor positioning

Post by ajmaske »

EvilBMP wrote:Sure, it has something to do with my post - but the implementation is correct. If you are using TABs insted of spaces to indent you don't need an indent-size of (I think default) 2 or more. You just need 1 - because you want to use TABs and no spaces.

So simply reduce the indent-size to 1 and everything works fine :) I really appreciate this feature!

Thx to the team.
There's still a problem.... I currently have ...

Indent size: 1
Tab size: 4

and I still end up with ....

Code: Select all

                {
 |
                 }
the exact opposite of my original post... and actually regardless of the position of the curly's the left edge the cursor still gets positioned 1 tab from the left edge of the editor.

So there is still problems with this...
Anthony
User avatar
EvilBMP
Posts: 120
Joined: Thu Jan 04, 2007 1:57 am
Location: Germany

Re: Newly introduced: {} and cursor positioning

Post by EvilBMP »

ajmaske wrote:the exact opposite of my original post... and actually regardless of the position of the curly's the left edge the cursor still gets positioned 1 tab from the left edge of the editor.

So there is still problems with this...
You are right! - I didn't test it for still indented code - sorry :oops:

But I think, the DEV-Team will fix this :)
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Newly introduced: {} and cursor positioning

Post by Gatis »

I am afraid I did not get this. Can you please explain the exact problem once more:
1)what is the code before you press return key
2)what do you get after that
3)what do you expect it to be
Thanks!
Kind regards,
Gatis Avots
ajmaske
Posts: 38
Joined: Fri Jun 01, 2007 4:15 am
Location: Modesto, CA
Contact:

Re: Newly introduced: {} and cursor positioning

Post by ajmaske »

Gatis wrote:I am afraid I did not get this. Can you please explain the exact problem once more:
1)what is the code before you press return key
2)what do you get after that
3)what do you expect it to be
Thanks!
Hi Gatis,

With "Auto indent" turned on when I type the first curly bracket "{" WeBuilder adds the closing bracket "{}" and positions the cursor in between them. When I press enter the curly brackets open up and the cursor is positioned one tab size between them... ie... lets assume the pipe | is the cursor...

Code: Select all

{
    |
}
This was the behavior in the previous version prior to v9.0.0.94. However, with v9.0.0.94 the behavior is still similar however the cursor is no longer positioned 1 tab space it is now positioned 3-5 tab spaces so it looks something like...

Code: Select all

{
                    |
}
I've tried changing the Indent Size but still experience the same results... What ever was done between .93 and .94 in regards to the Auto indent may have fixed one thing with regards to "Convert tabs to spaces" checked but broke it when it is unchecked.

If I confused you more I apologize...

Thanks,

Anthony
Anthony
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Newly introduced: {} and cursor positioning

Post by Gatis »

Thank you, Anthony, for your report.
Well, I did try to repeat the problem, but without any luck. All seems to work well and the exact count of tabs or spaces specified in preferences is inserted.
I wonder what exactly is the difference... Can it happen that you have special sequence of spaces or some text before or after the curly braces { and } ?

If you turn in "Show hidden characters" under Options, this might help you to see what exactly is going on.
Kind regards,
Gatis Avots
User avatar
EvilBMP
Posts: 120
Joined: Thu Jan 04, 2007 1:57 am
Location: Germany

Re: Newly introduced: {} and cursor positioning

Post by EvilBMP »

@Gatis

I'll make a little screencast when I am done with my work here - this should help to understand the problem.
ajmaske
Posts: 38
Joined: Fri Jun 01, 2007 4:15 am
Location: Modesto, CA
Contact:

Re: Newly introduced: {} and cursor positioning

Post by ajmaske »

EvilBMP wrote:@Gatis

I'll make a little screencast when I am done with my work here - this should help to understand the problem.
Thank you EvilBMP... I'm really terrible at explaining things like this...
Anthony
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Newly introduced: {} and cursor positioning

Post by Karlis »

I can see two bugs
1) It should respect "Convert tabs to spaces" setting. If this is on, it should use spaces instead of tabs.
2) The indent size is not correct. It is Tab width x indent size, but it should be just Tab width.

We will correct this.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Newly introduced: {} and cursor positioning

Post by Karlis »

Try 9.0.0.95 it should now use only *one* tab OR the speciified number of spaces (indent size) if "Convert Tabs to Spaces" is on.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
EvilBMP
Posts: 120
Joined: Thu Jan 04, 2007 1:57 am
Location: Germany

Re: Newly introduced: {} and cursor positioning

Post by EvilBMP »

Karlis wrote:Try 9.0.0.95 it should now use only *one* tab OR the speciified number of spaces (indent size) if "Convert Tabs to Spaces" is on.
Sorry, but this setting makes no sense! Why should I mark "Convert Tabs to Spaces", if I want TABs for the auto-indent and no spaces ... sorry, but this is really strange! And the option "Convert Tabs to Spaces" should only do what it says ... and shouldn't produce Tabs instead of spaces in auto-indent mode.

Nevertheless xxx95 still doesn't work correct! Here my promised screencast :arrow: click me

Thx, EvilBMP
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Newly introduced: {} and cursor positioning

Post by Karlis »

There is still a bug, I agree.

There is if ConvertTabsToSpaces then UseTab else UseSpace
Should be if NOT ConvertTabsToSpaces then UseTab else UseSpace

Also you did not mention about trailing space removal option, so we did not test that. If that is on, there are some problems indeed. Thanks. will correct some time later.
Karlis Blumentals
Blumentals Software
www.blumentals.net
ajmaske
Posts: 38
Joined: Fri Jun 01, 2007 4:15 am
Location: Modesto, CA
Contact:

Re: Newly introduced: {} and cursor positioning

Post by ajmaske »

Thanks everyone... playing around with the options I was able to get the behavior I was looking for ... so for now I'm good to go...

Oh, by the way... EvilBMP... thank you very much for taking the time to put that screen cast together...


Anthony
Anthony
Post Reply