mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
commenting blank now does nothing
This commit is contained in:
parent
14bf2addd9
commit
8522ca4216
1 changed files with 18 additions and 4 deletions
|
@ -2280,7 +2280,23 @@ namespace IDE.ui
|
||||||
|
|
||||||
int firstCharPos = minPos + (startLen - afterTrimStart);
|
int firstCharPos = minPos + (startLen - afterTrimStart);
|
||||||
int lastCharPos = maxPos - (afterTrimStart - afterTrimEnd);
|
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++)
|
for (int i = firstCharPos; i < lastCharPos - 1; i++)
|
||||||
{
|
{
|
||||||
|
@ -2298,9 +2314,7 @@ namespace IDE.ui
|
||||||
}
|
}
|
||||||
mSelection = EditSelection(minPos, lastCharPos);
|
mSelection = EditSelection(minPos, lastCharPos);
|
||||||
}
|
}
|
||||||
int q = 0;
|
else if ((doComment != true) && (trimmedStr.StartsWith("/*")))
|
||||||
var nc = trimmedStr.Count('\n');
|
|
||||||
if ((doComment != true) && (trimmedStr.StartsWith("/*")))
|
|
||||||
{
|
{
|
||||||
if (trimmedStr.EndsWith("*/\n"))
|
if (trimmedStr.EndsWith("*/\n"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue