Repository: vscode
Issue: Notebook cell fails to run command notebook.cell.executeAndSelectBelow when markdown cell is immediately below
Labels: bug,notebook-commands


Type: <b>Bug</b>

Executing the command to run the current cell and move to the cell below (notebook.cell.executeAndSelectBelow) fails to run when a markdown cell is the cell below the current cell. I'm experiencing this whether or not the keyboard shortcut is used (i.e., initiating from the Command Pallette as well). It actually seems to be engaged both in the editor of the code cell (remains in the current cell with the cursor blinking) and also selects the below markdown cell in command mode all without actually running the code in the current cell, which is interesting. notebook.cell.executeAndFocusContainer (Ctrl + Enter on my keymapping) works as expected. If the markdown cell is removed and either a code cell or no cell is immediately below the current cell, the command executes as expected. 

Steps to Repro:
 - Create a notebook with a code cell and write arbitrary code to execute
 - Create a markdown cell below the code cell
 - Move back to the code cell and run the notebook.cell.executeAndSelectBelow command (either while in the cell editor mode or command mode)

Let me know if I can provide any additional information and/or context. Thanks.

VS Code version: Code - Insiders 1.88.0-insider (be210b3a60c7d60030c1d3d92da00d008edf6ab9, 2024-03-15T05:48:19.790Z)
OS version: Windows_NT x64 10.0.22631
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 2995)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|15.85GB (5.14GB free)|
|Process Argv|C:\\dev\\testing\\testing_v1.ipynb --crash-reporter-id 48b8fe0f-668c-43c4-9c7a-3d67fba62f2b|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (23)</summary>

Extension|Author (truncated)|Version
---|---|---
python-environment-manager|don|1.2.4
python-extension-pack|don|1.7.0
prettier-vscode|esb|10.1.0
copilot|Git|1.174.0
copilot-chat|Git|0.14.2024031501
path-autocomplete|ion|1.25.0
vsc-python-indent|Kev|1.18.0
csdevkit|ms-|1.4.29
csharp|ms-|2.22.3
vscode-dotnet-runtime|ms-|2.0.2
debugpy|ms-|2024.3.10731008
python|ms-|2024.3.10742127
vscode-pylance|ms-|2024.3.100
jupyter|ms-|2024.3.2024031501
jupyter-keymap|ms-|1.1.2
jupyter-renderers|ms-|1.0.17
vscode-jupyter-cell-tags|ms-|0.1.8
vscode-jupyter-slideshow|ms-|0.1.5
powershell|ms-|2024.0.0
autodocstring|njp|0.6.1
vscode-xml|red|0.26.2024031317
color-manager|roy|0.7.5
json|Zai|2.0.2

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593:30376534
py29gd2263:30784851
c4g48928:30535728
vscrpc:30624061
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
2e7ec940:30986170
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
bf62j303:30968145
pydisww1:30991133
cppperfnew:30980852
8082a590:30961435
fegfb526:30952798
bg6jg535:30979844
ccp2r3:30958153
pythonait:30973460
jchc7451:30973074
gee8j676:30988845

```

</details>

<!-- generated by issue reporter -->