fbpx

Xide Comment with Control + B

More
9 months 3 weeks ago #1 by Stefan Hirsch
Xide Comment with Control + B was created by Stefan Hirsch
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:
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:
//CLASS Foo
//Comment line
//    PROTECT xxx AS STRING
    //Protect yyy as INT
//CONSTRUCTOR()
//RETURN
//END CLASS

Then press CONTROL + B again, you get:
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

Please Log in or Create an account to join the conversation.

More
9 months 3 weeks ago #2 by Chris Pyrgas
Replied by Chris Pyrgas on topic Xide Comment with Control + B
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

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

More
9 months 3 weeks ago #3 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic Xide Comment with Control + B
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

Please Log in or Create an account to join the conversation.

More
9 months 3 weeks ago #4 by Chris Pyrgas
Replied by Chris Pyrgas on topic Xide Comment with Control + B
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

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

More
9 months 3 weeks ago #5 by Wolfgang Riedmann
Replied by Wolfgang Riedmann on topic Xide Comment with Control + B
Hi Chris,

ok, thank you very much!

Wolfgang

Please Log in or Create an account to join the conversation.