Only resolve text before the cursor position