1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-15 14:54:09 +02:00

minor fix

This commit is contained in:
unknown 2021-12-21 11:12:32 +02:00
parent acc2e5b14c
commit 3a25b8385f
2 changed files with 5 additions and 3 deletions

View file

@ -120,7 +120,7 @@ namespace IDE.Compiler
static extern bool BfParser_Reduce(void* bfParser, void* bfPassInstance); static extern bool BfParser_Reduce(void* bfParser, void* bfPassInstance);
[CallingConvention(.Stdcall), CLink] [CallingConvention(.Stdcall), CLink]
static extern char8* BfParser_Format(void* bfParser, int32 formatEnd, int32 formatStart, out int32* outCharMapping, int32 maxCol); static extern char8* BfParser_Format(void* bfParser, int32 formatEnd, int32 formatStart, out int32* outCharMapping, int32 maxCol);
[CallingConvention(.Stdcall), CLink] [CallingConvention(.Stdcall), CLink]
static extern char8* BfParser_GetDebugExpressionAt(void* bfParser, int32 cursorIdx); static extern char8* BfParser_GetDebugExpressionAt(void* bfParser, int32 cursorIdx);
@ -207,8 +207,9 @@ namespace IDE.Compiler
public void Reformat(int formatStart, int formatEnd, out int32[] char8Mapping, String str) public void Reformat(int formatStart, int formatEnd, out int32[] char8Mapping, String str)
{ {
int32* char8MappingPtr; int32* char8MappingPtr;
var stringPtr = BfParser_Format(mNativeBfParser, (int32)formatStart, (int32)formatEnd, out char8MappingPtr, gApp.mSettings.mEditorSettings.mWrapCommentsAt); var maxCol = gApp.mSettings.mEditorSettings.mWrapCommentsAt;
str.Append(stringPtr); var stringPtr = BfParser_Format(mNativeBfParser, (int32)formatStart, (int32)formatEnd, out char8MappingPtr, maxCol);
str.Append(stringPtr);
char8Mapping = new int32[str.Length]; char8Mapping = new int32[str.Length];
for (int32 i = 0; i < char8Mapping.Count; i++) for (int32 i = 0; i < char8Mapping.Count; i++)

View file

@ -127,6 +127,7 @@ namespace IDE.ui
AddPropertiesItem(category, "Format on Save", "mFormatOnSave"); AddPropertiesItem(category, "Format on Save", "mFormatOnSave");
AddPropertiesItem(category, "Sync with Workspace Panel", "mSyncWithWorkspacePanel"); AddPropertiesItem(category, "Sync with Workspace Panel", "mSyncWithWorkspacePanel");
AddPropertiesItem(category, "Wrap comments at length (0 = none)", "mWrapCommentsAt"); AddPropertiesItem(category, "Wrap comments at length (0 = none)", "mWrapCommentsAt");
category.Open(true, true); category.Open(true, true);
} }