| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -299,13 +299,14 @@ make sure that it uses numbers (or displayWidth/Height), copy into settings | |||
| 299 | 299 | MatchResult setupMatch = findInCurrentScope(VOID_SETUP_REGEX, uncommented); | |
| 300 | 300 | if (setupMatch != null) { | |
| 301 | 301 | int start = uncommented.indexOf("{", setupMatch.end()); | |
| 302 | - | ||
| 303 | - // Find a closing brace | ||
| 304 | - MatchResult match = findInCurrentScope(CLOSING_BRACE, uncommented, start); | ||
| 305 | - if (match != null) { | ||
| 306 | - searchArea = uncommented.substring(start + 1, match.end() - 1); | ||
| 307 | - } else { | ||
| 308 | - throw new SketchException("Found a { that's missing a matching }", false); | ||
| 302 | + if (start >= 0) { | ||
| 303 | + // Find a closing brace | ||
| 304 | + MatchResult match = findInCurrentScope(CLOSING_BRACE, uncommented, start); | ||
| 305 | + if (match != null) { | ||
| 306 | + searchArea = uncommented.substring(start + 1, match.end() - 1); | ||
| 307 | + } else { | ||
| 308 | + throw new SketchException("Found a { that's missing a matching }", false); | ||
| 309 | + } | ||
| 309 | 310 | } | |
| 310 | 311 | } | |
| 311 | 312 | break; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments