Fix hint insertion when the cursor is surrounded by whitespace