1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Select line on empty selection for Comment/Uncomment Selection

This commit is contained in:
Brian Fiete 2021-02-01 14:15:52 -08:00
parent e33ca41fd0
commit 1b7a4139e7

View file

@ -2162,6 +2162,14 @@ namespace IDE.ui
if (CheckReadOnly())
return false;
if ((!HasSelection()) && (doComment != null))
{
CursorToLineEnd();
int cursorEndPos = CursorTextPos;
CursorToLineStart(false);
mSelection = .(CursorTextPos, cursorEndPos);
}
if ((HasSelection()) && (mSelection.Value.Length > 1))
{
var startLineAndCol = CursorLineAndColumn;