Repository: vscode
Issue: Unexpected behaviour in search and replace
Labels: bug,notebook-find

## Environment data

-   VS Code version: 1.74.2
-   Jupyter Extension version (available under the Extensions sidebar): v2022.11.1003412109
-   Python Extension version (available under the Extensions sidebar): v2022.20.1 (first test machine), None (second test machine)
-   OS (Windows | Mac | Linux distro) and version: MacOS 13.0.1 (first machine), Windows 11 21H2 (second machine)
-   Python and/or Anaconda version: CPython 3.10.8 (first machine), CPython 3.10.7 (second machine)
-   Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
-   Jupyter server running: Local

## Expected behaviour

When you are doing search and replace in a Jupyter notebook, after you have replaced an item, you should be directed to the next item found in the notebook. ~~(I'm not sure if search and replace should be global instead of limited to a cell in the first place but that's a separate question)~~  

## Actual behaviour

You are instead directed to the first or the second item in the notebook.  

## Steps to reproduce:

1. Create a cell in an empty notebook and fill it with lines of `# test`.  
2. Move the cursor to any line other than line 1 or line 2.  
3. Put the cursor on the word `test` and press Ctrl+F.  
4. Type something to replace `test` with and click Replace.  

![Demostration](https://user-images.githubusercontent.com/112813970/210151750-71c356a0-2d89-455b-b468-75c79863ba7f.gif)

## Logs

<details>

<summary>Output for <code>Jupyter</code> in the <code>Output</code> panel (<code>View</code>→<code>Output</code>, change the drop-down the upper-right of the <code>Output</code> panel to <code>Jupyter</code>)
</summary>

<p>

(Second test machine)
```
Visual Studio Code (1.74.2, undefined, desktop)
Jupyter Extension Version: 2022.11.1003412109.
Python Extension Version: 2022.20.1.
No workspace folder opened.
info 17:41:25.252: ZMQ install verified.
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 17:41:26.121: LSP Notebooks experiment is disabled -- not using Pylance
info 17:41:26.656: Find preferred kernel for Untitled-1.ipynb with metadata {"orig_nbformat":4} & preferred interpreter c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe
info 17:41:26.658: Find preferred kernel for Untitled-1.ipynb with metadata {"orig_nbformat":4} & preferred interpreter c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe
info 17:41:26.755: Find preferred kernel for Untitled-1.ipynb with metadata {"orig_nbformat":4} & preferred interpreter c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe
info 17:41:26.979: Got empty env vars with python c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe in 257ms
info 17:41:26.990: Process Execution: > ~\AppData\Local\Programs\Python\Python310\python.exe -m pip list
> ~\AppData\Local\Programs\Python\Python310\python.exe -m pip list
error 17:41:27.583: Live Notebook not available for Untitled-1.ipynb
error 17:41:27.672: Live Notebook not available for Untitled-1.ipynb
info 17:41:27.767: Preferred kernel .jvsc74a57bd0e59c0217e8c720443bc896acebb829783a61c427ceaf2efbd70f6a734520b4ac.c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher is exact match or top match for non python kernels, (true, [object Object], false, undefined)
info 17:41:27.770: PreferredConnection: .jvsc74a57bd0e59c0217e8c720443bc896acebb829783a61c427ceaf2efbd70f6a734520b4ac.c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\fakeuser\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher found for NotebookDocument: Untitled-1.ipynb
error 17:41:27.786: Live Notebook not available for Untitled-1.ipynb
error 17:41:27.859: Live Notebook not available for Untitled-1.ipynb
```

</p>
</details>