Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 65e035c

Browse files
author
Craig Rushforth
committed
Fixed issue where it would remove too many lines form the original source instead of the trailing '}' when appending to the end of a method
1 parent 48dd790 commit 65e035c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugin/Editor/PostBuildTrigger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private static void InsertCodeIntoClass(string filepath, string[] methodSignatur
117117
newContents.Add(valuesToAppend[foundIndex] + rn);
118118
found = false;
119119
} else if((positionsInMethod[foundIndex] == Position.End) && line.Trim().Equals("}")) {
120-
newContents = newContents.GetRange(0, newContents.Count - 3);
120+
newContents = newContents.GetRange(0, newContents.Count - 1);
121121
newContents.Add(valuesToAppend[foundIndex] + rn + "}" + rn);
122122
found = false;
123123
}

0 commit comments

Comments
 (0)