xsharp.eu • Xide Comment with Control + B
Page 1 of 1

Xide Comment with Control + B

Posted: Tue Mar 27, 2018 1:51 pm
by SHirsch
Hi Chris,

a small bug (or feature?) with comment function.
In code there are some comment lines ( with // ). When I now select all code (ALT + A) and then press CONTROL + B all code lines begin with // (which is fine). But comment lines starting with // get no additional // in front. When I now decomment with CONTROL + B the original comment lines are no comment lines any more.

Sample:

Code: Select all

CLASS Foo
//Comment line
    PROTECT xxx AS STRING
    //Protect yyy as INT
CONSTRUCTOR()
RETURN
END CLASS
now press ALT + A then CONTROL + B, you get:

Code: Select all

//CLASS Foo
//Comment line
//    PROTECT xxx AS STRING
    //Protect yyy as INT
//CONSTRUCTOR()
//RETURN
//END CLASS
Then press CONTROL + B again, you get:

Code: Select all

CLASS Foo
Comment line
    PROTECT xxx AS STRING
    PROTECT yyy AS INT
CONSTRUCTOR()
RETURN
END CLASS
In VO all lines get //. And comment lines then have multiple //.

Regards,
Stefan

Xide Comment with Control + B

Posted: Tue Mar 27, 2018 3:01 pm
by Chris
Hi Stefan,

Yes, this is actually a feature, for some reason I had thought it makes more sense like that. But now that you mention it, I agree it most probably doesn't, so I will change it to work as you suggest and as VO works, thanks for the suggestion. Unless someone else has an objection, in which case I will just make the different behavior optional :)

Chris

Xide Comment with Control + B

Posted: Tue Mar 27, 2018 3:34 pm
by wriedmann
Hi Chris,

sometimes the current behavior is very useful. So maybe Ctrl+Shift+B (and a corresponding menu option) for the current behavior would be desirable.

(I miss this in VO too).

Wolfgang

Xide Comment with Control + B

Posted: Tue Mar 27, 2018 3:37 pm
by Chris
Hi Wolfgang,

CTRL+SHIFT+B is used for doing block comments (/*....*/ instead of //). So I will just make the new behavior optional (in Preferences).

Chris

Xide Comment with Control + B

Posted: Tue Mar 27, 2018 6:29 pm
by wriedmann
Hi Chris,

ok, thank you very much!

Wolfgang