mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-01 11:12:49 +08:00
Fix string/comment state being incorrect if match ended at last character
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user