mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-06 01:23:31 +08:00
Fix string/comment state being incorrect if match ended at last character
This commit is contained in:
parent
aaab10a0a0
commit
97c20144f1
@ -113,7 +113,7 @@ namespace UnityExplorer.UI.CSConsole
|
||||
sb.Append(SignatureHighlighter.CLOSE_COLOR);
|
||||
|
||||
// check caretIdx to determine inStringOrComment state
|
||||
if (caretIdx >= match.startIndex && caretIdx <= match.endIndex)
|
||||
if (caretIdx >= match.startIndex && (caretIdx <= match.endIndex || (caretIdx >= input.Length && match.endIndex >= input.Length - 1)))
|
||||
caretInStringOrComment = match.isStringOrComment;
|
||||
|
||||
// update the last unhighlighted start index
|
||||
|
Loading…
x
Reference in New Issue
Block a user