HF RL Explorer

GetWordAfterCursorUntilSeparatorIgnoreNextToCursor panics with slice bounds out of range

GetWordAfterCursorUntilSeparatorIgnoreNextToCursor panics with slice bounds out of range: a task in UltraTerminal (Harbor dataset). When calling GetWordAfterCursorUntilSeparatorIgnoreNextToCursor on a Document, the function panics with "slice bounds out of range :-2 " error. This appears to happen…

The task

When calling `GetWordAfterCursorUntilSeparatorIgnoreNextToCursor` on a Document, the function panics with "slice bounds out of range [:-2]" error. This appears to happen when the function tries to slice with negative indices.

Part of harness-hub/UltraTerminal.