1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-16 23:34:10 +02:00

Merge pull request #1266 from marsej/Comment-toggle-alternate-style-fix

Added editor option for // -style comments in certain cases
This commit is contained in:
Brian Fiete 2021-12-21 07:31:42 -05:00 committed by GitHub
commit 35ebc965d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 268 additions and 21 deletions

View file

@ -2429,6 +2429,22 @@ namespace IDE
sewc.DuplicateLine();
}
[IDECommand]
void CommentBlock()
{
var sewc = GetActiveSourceEditWidgetContent();
if (sewc != null)
sewc.CommentBlock();
}
[IDECommand]
void CommentLines()
{
var sewc = GetActiveSourceEditWidgetContent();
if (sewc != null)
sewc.CommentLines();
}
[IDECommand]
void CommentSelection()
{
@ -5391,6 +5407,8 @@ namespace IDE
advancedEditMenu.AddMenuItem(null);
AddMenuItem(advancedEditMenu, "Make Uppercase", "Make Uppercase");
AddMenuItem(advancedEditMenu, "Make Lowercase", "Make Lowercase");
AddMenuItem(advancedEditMenu, "Comment Block", "Comment Block");
AddMenuItem(advancedEditMenu, "Comment Lines", "Comment Lines");
AddMenuItem(advancedEditMenu, "Comment Selection", "Comment Selection");
AddMenuItem(advancedEditMenu, "Uncomment Selection", "Uncomment Selection");
AddMenuItem(advancedEditMenu, "Reformat Document", "Reformat Document");