Repository: TypeScript
Issue: Expand and shrink selection around JavaScript `if-elseif-else` statements
Labels: Suggestion,Awaiting More Feedback,Domain: Smart-Select

### Acknowledgement

- [X] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

### Comment

I am unsure if this is a bug or a feature request.

The expand and shrink selection does not work as expected around if-elseif-else statments.

```js
    const a = 1;
    if (a === 1) {
      // foo
    } else if (a === 2) {
      // fii
    } else {
      // fum
    }
```

## Actual behavior
Place the cursor between `else if` and try to expand selection. It expands like this.


**Start**
![image](https://github.com/microsoft/TypeScript/assets/30827238/89358d68-1a3e-4a5e-97c6-59cb160a8f9e)

**Middle** (few more expansions needed to get here)
![image](https://github.com/microsoft/TypeScript/assets/30827238/46f51070-24dc-41ae-9592-6b71266bbf18)

**End** (only one more expansion from the one above)
![image](https://github.com/microsoft/TypeScript/assets/30827238/9d88f876-9f4e-4ac9-8c64-990350651966)


## Expected behavior

I expected it to select it like this, starting from **Middle** above:

![image](https://github.com/microsoft/TypeScript/assets/30827238/46f51070-24dc-41ae-9592-6b71266bbf18)
![image](https://github.com/microsoft/TypeScript/assets/30827238/6ad9ae3d-20d9-4d8d-852b-0d095fac50a0)
![image](https://github.com/microsoft/TypeScript/assets/30827238/2671654e-bdf9-43ad-bbdb-88c6ad0b686f)
![image](https://github.com/microsoft/TypeScript/assets/30827238/470f17d4-1342-4569-99dd-3f404e600cbc)


## Additional context

VS Code version: Code 1.84.1 (2b35e1e6d88f1ce073683991d1eff5284a32690f, 2023-11-06T12:35:59.022Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.4.0-166-generic

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (8 x 2611)|
|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>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)|31.69GB (17.72GB free)|
|Process Argv|--crash-reporter-id e332dab4-91ea-49d1-8a1f-d8f6e06fa4e1|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: vm|
|OS|Linux x64 5.4.0-166-generic|
|CPUs|Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz (8 x 2394)|
|Memory (System)|31.32GB (23.28GB free)|
|VM|50%|
</details><details><summary>Extensions (35)</summary>

Extension|Author (truncated)|Version
---|---|---
jest-snippets|and|1.9.1
remote-containers|ms-|0.321.0
remote-ssh|ms-|0.107.0
remote-ssh-edit|ms-|0.86.0
remote-wsl|ms-|0.81.8
vscode-remote-extensionpack|ms-|0.24.0
remote-explorer|ms-|0.4.1
remote-server|ms-|1.5.0
highlight-matching-tag|vin|0.11.0
browserslist|web|1.1.0
vscode-openapi|42C|4.18.6
lit-html|bie|1.11.1
ruff|cha|2023.44.0
vale-vscode|chr|0.17.5
vscode-markdownlint|Dav|0.52.0
vscode-eslint|dba|2.4.2
gitlens|eam|14.4.1
prettier-vscode|esb|10.1.0
code-runner|for|0.12.1
go|gol|0.39.1
path-autocomplete|ion|1.25.0
vscode-azureresourcegroups|ms-|0.7.5
vscode-cosmosdb|ms-|0.20.0
vscode-docker|ms-|1.27.0
vscode-kubernetes-tools|ms-|1.3.15
python|ms-|2023.20.0
vscode-pylance|ms-|2023.11.10
azure-account|ms-|0.11.6
vscode-yaml|red|1.14.0
vscode-direnv|Rub|0.0.2
code-spell-checker|str|3.0.1
vscode-stylelint|sty|1.3.0
even-better-toml|tam|0.19.2
shellcheck|tim|0.34.0
vscode-proto3|zxh|0.5.5


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30880073
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyonecf:30548226
2e4cg342:30602488
f6dab269:30613381
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
synctok:30869157
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30871694
pythonregdiag2cf:30871583
pyreplss2:30879913
pythonmypyd1:30879173
pythoncet00cf:30874137
pythontbext0:30879054
dsvsc017cf:30880893
aa_t_chat:30882232

```

</details>

<!-- generated by issue reporter -->