sync preview pane with text cursor