Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1530 Add curly braces around selection
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kurt
Junior Member

15 Posts

Posted - Jul 17 2006 :  06:11:32 AM  Show Profile  Reply with Quote
In 1526 and 1530 (VS2005/C++), when I click the line number to select a full line of text in a C++ file and hit the '{' key, it merely inserts a '{' at the beginning of the line and a '}' at the beginning of the following line:

rel->rows = 0;
{ rel->width = 0;
} rel->reltargetlist = NIL;
rel->pathlist = NIL;

instead of indenting the selected line and adding braces above and below like the following (as it used to do in 1446 and before)...

rel->rows = 0;
{
rel->width = 0;
}
rel->reltargetlist = NIL;

Instead of selecting the whole line, I tried selecting only the nonblank portion of the line, "rel->width = 0;". Again when I hit '{' it inserted braces at the beginning and end of the selection with no additional formatting (which is ok in this case I guess):

rel->rows = 0;
{rel->width = 0;}
rel->reltargetlist = NIL;

Now it gets weird. If I click on another line, undo and redo a few edits, and then use the mouse (not keyboard) to select the same nonblank portion of the line, then hit '{', it gives the desired formatting:

rel->rows = 0;
{
rel->width = 0;
}
rel->reltargetlist = NIL;

kurt
Junior Member

15 Posts

Posted - Jul 17 2006 :  06:21:00 AM  Show Profile  Reply with Quote
Hmm, the forum took out the indentation... let me try again with code tags...

Bad: (1526, 1530)

    rel->rows = 0;
    { rel->width = 0;
    } rel->reltargetlist = NIL;
    rel->pathlist = NIL;

What I wanted: (1446 did this)

    rel->rows = 0;
    {
        rel->width = 0;
    }
    rel->reltargetlist = NIL;

Selecting only the nonblank portion of the line (1530):

    rel->rows = 0;
    {rel->width = 0;}
    rel->reltargetlist = NIL;

After mystic gestures it unpredictably does the right thing (1530):

    rel->rows = 0;
    {
        rel->width = 0;
    }
    rel->reltargetlist = NIL;

Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jul 17 2006 :  12:04:11 PM  Show Profile  Reply with Quote
Does the problem depend on the direction in which you make your selection? Try selecting from first to second line, then from second to first line.
Go to Top of Page

kurt
Junior Member

15 Posts

Posted - Jul 22 2006 :  11:01:46 PM  Show Profile  Reply with Quote
The result is the same no matter whether I select forward or backward, using cursor keys or the mouse, in either the text area or the line number area.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jul 22 2006 :  11:50:03 PM  Show Profile  Reply with Quote
This is working for me, so let's try to find the trigger.

What font are you using? Do you use tabs, or spaces for indention? What kind of line ending (DOS/Unix)? Is the file Unicode, MBCS, or something else? Any other add-ins? Are you using a localized version of Windows or VS?

Joe Pizzi
Go to Top of Page

kurt
Junior Member

15 Posts

Posted - Jul 24 2006 :  7:49:22 PM  Show Profile  Reply with Quote
Courier New 10pt, spaces for indention, Unix line ending, default character encoding (not Unicode, MBCS, etc), no other add-ins, US English version of Windows and VS.

VS editing options: Virtual space is enabled, smart indenting, tab size 4, indent size 4, insert spaces, do not indent braces.

VAX text editor options: Surround selection is enabled, format after paste is disabled, suggestions and autotext are enabled.

Autotext for title "{ ... }" is (I think) the default:

{
	$selected$$end$
}

Note that I've edited the autotext file (Visual Assist X\\AutotextCpp.tpl)
to change its line endings from DOS (CRLF) to Unix (LF), in an
unsuccessful effort to stop DOS line endings from showing up in
edited code (has always been a problem with VA).

Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jul 24 2006 :  11:17:45 PM  Show Profile  Reply with Quote
Yep. That was it. Unix line endings.

case=1794

Joe Pizzi
Go to Top of Page

kurt
Junior Member

15 Posts

Posted - Aug 28 2006 :  8:10:06 PM  Show Profile  Reply with Quote
Any hope of a fix? The annoyance is constant, every few minutes while editing. argh
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 29 2006 :  02:00:27 AM  Show Profile  Reply with Quote
I have "pinged" the case. Let's see what changes. So far, I see no activity on the case.

Joe Pizzi
Go to Top of Page

kurt
Junior Member

15 Posts

Posted - Sep 05 2006 :  8:03:37 PM  Show Profile  Reply with Quote
Also reported by dodudo7 in form topic 5249.
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5249
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Dec 19 2006 :  9:03:20 PM  Show Profile  Reply with Quote
case=1794 is fixed in build 1543
Go to Top of Page

kurt
Junior Member

15 Posts

Posted - Dec 26 2006 :  02:28:40 AM  Show Profile  Reply with Quote
Thank you! Thank you! Thank you!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000