Bug 2995296 fix
This commit is contained in:
parent
d705c2f37a
commit
1ed749bf85
1 changed files with 11 additions and 7 deletions
|
@ -1748,14 +1748,18 @@ namespace LSLEditor
|
||||||
string strW = GetNewWhiteSpace(-1);
|
string strW = GetNewWhiteSpace(-1);
|
||||||
int intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length);
|
int intTabs = (int)(strW.Length / AutoFormatter.GetTab().Length);
|
||||||
|
|
||||||
if (this.SelectionLength == 0)
|
int intLastLine = this.GetLineFromCharIndex(this.SelectionStart + this.SelectionLength);
|
||||||
|
|
||||||
|
int intLine = this.GetLineFromCharIndex(this.SelectionStart);
|
||||||
|
this.SelectionStart = this.GetFirstCharIndexFromLine(intLine);
|
||||||
|
int intLength = 0;
|
||||||
|
do
|
||||||
{
|
{
|
||||||
int intLine = this.GetLineFromCharIndex(this.SelectionStart);
|
intLength += this.Lines[intLine].Length + 1;
|
||||||
int intStart = this.GetFirstCharIndexFromLine(intLine);
|
intLine++;
|
||||||
int intLength = this.Lines[intLine].Length + 1;
|
} while (intLine <= intLastLine);
|
||||||
this.SelectionStart = intStart;
|
this.SelectionLength = intLength;
|
||||||
this.SelectionLength = intLength;
|
|
||||||
}
|
|
||||||
string strSelectedText = AutoFormatter.MultiLineComment(blnAdd, intTabs, this.SelectedText);
|
string strSelectedText = AutoFormatter.MultiLineComment(blnAdd, intTabs, this.SelectedText);
|
||||||
|
|
||||||
int intBackup = this.SelectionStart;
|
int intBackup = this.SelectionStart;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue