Sticky scroll indentationModel doesn't work if no line is present after the indented block
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.127.0
- OS Version: WSL2 - Windows 11 Pro, version 25H2
Steps to Reproduce:
1. Select `indentationModel` in Sticky scroll settings (`"editor.stickyScroll.defaultModel": "indentationModel"`)
2. Create a python file with:
```python
def foo():
x = 1
```
3. Try to scroll and the first line is not sticky
4. Add a line below, thus having
```python
def foo():
x = 1
# [one more line here, indented or not, without this comment]
```
5. Now the first line is sticky
It can be a subtle thing, but I was having an hard time undestanding why everything inside my class didn't stick and it was annoying not knowing which function I was modifying
Contributor guide
Assessment
This issue has not been assessed yet.