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

commenting blank now does nothing

This commit is contained in:
unknown 2021-12-11 07:02:11 +02:00
parent 14bf2addd9
commit 8522ca4216

View file

@ -2280,7 +2280,23 @@ namespace IDE.ui
int firstCharPos = minPos + (startLen - afterTrimStart);
int lastCharPos = maxPos - (afterTrimStart - afterTrimEnd);
if ((doComment != true) && (trimmedStr.Contains("//")))
int q = 0;
var nc = trimmedStr.Count('\n');
if(afterTrimEnd == 0)
{
if (undoBatchStart != null)
mData.mUndoManager.Add(undoBatchStart.mBatchEnd);
CursorLineAndColumn = startLineAndCol;
if (doComment == null)
mSelection = null;
return false; // not sure if this should be false in blank/only whitespace selection case
}
else if ((doComment != true) && (trimmedStr.Contains("//")))
{
for (int i = firstCharPos; i < lastCharPos - 1; i++)
{
@ -2298,9 +2314,7 @@ namespace IDE.ui
}
mSelection = EditSelection(minPos, lastCharPos);
}
int q = 0;
var nc = trimmedStr.Count('\n');
if ((doComment != true) && (trimmedStr.StartsWith("/*")))
else if ((doComment != true) && (trimmedStr.StartsWith("/*")))
{
if (trimmedStr.EndsWith("*/\n"))
{