Commit e91b042
committed
fix: use virtual text for heading border at start & end
## Details
Issue: #187
When using smoothscrolling and textwrap on long lines pasting text
would cause a visual bug where text was duplicated.
This ended up being because when a heading is the last line in a file we
attempt to use an overlay to put the border below it.
I assumed I had written the logic to use virtual text on both ends of a
document however it turns out virtual text was only used at the top most
line as a special case and not at the bottom.
The fix for this bug is then straightforward and we now validate a line
exists and is empty rather than not existing meaning empty.
While this specific issue is fixed it does seem there are generally some
issues with smoothscrolling, textwrap, and virtual lines.1 parent efb4c48 commit e91b042
File tree
3 files changed
+5
-4
lines changed- lua/render-markdown
- core
- render
3 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| |||
0 commit comments