mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Merge pull request #1129 from disarray2077/fix_stackoverflow_dew
Fix stack overflow in DarkEditWidget
This commit is contained in:
commit
d5ce181dc6
1 changed files with 4 additions and 4 deletions
|
@ -424,9 +424,9 @@ namespace Beefy.theme.dark
|
||||||
|
|
||||||
if (selEnd > selStart)
|
if (selEnd > selStart)
|
||||||
{
|
{
|
||||||
String selPrevString = scope String(selStart);
|
String selPrevString = new:ScopedAlloc! String(selStart);
|
||||||
selPrevString.Append(sectionText, 0, selStart);
|
selPrevString.Append(sectionText, 0, selStart);
|
||||||
String selIncludeString = scope String(selEnd);
|
String selIncludeString = new:ScopedAlloc! String(selEnd);
|
||||||
selIncludeString.Append(sectionText, 0, selEnd);
|
selIncludeString.Append(sectionText, 0, selEnd);
|
||||||
|
|
||||||
float selStartX = GetTabbedWidth(selPrevString, curX);
|
float selStartX = GetTabbedWidth(selPrevString, curX);
|
||||||
|
@ -473,7 +473,7 @@ namespace Beefy.theme.dark
|
||||||
|
|
||||||
if (isInside)
|
if (isInside)
|
||||||
{
|
{
|
||||||
String subText = scope String(mCursorTextPos - lineDrawStart);
|
String subText = new:ScopedAlloc! String(mCursorTextPos - lineDrawStart);
|
||||||
subText.Append(sectionText, 0, mCursorTextPos - lineDrawStart);
|
subText.Append(sectionText, 0, mCursorTextPos - lineDrawStart);
|
||||||
aX = GetTabbedWidth(subText, curX);
|
aX = GetTabbedWidth(subText, curX);
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,7 @@ namespace Beefy.theme.dark
|
||||||
|
|
||||||
if (char8Count < lineText.Length)
|
if (char8Count < lineText.Length)
|
||||||
{
|
{
|
||||||
String subString = scope String(char8Count);
|
String subString = new:ScopedAlloc! String(char8Count);
|
||||||
subString.Append(lineText, 0, char8Count);
|
subString.Append(lineText, 0, char8Count);
|
||||||
float subWidth = GetTabbedWidth(subString, 0);
|
float subWidth = GetTabbedWidth(subString, 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue