Commit 8ff7ec5
authored
Fix relocate at the end of buffer when scrollmargin is 0 (micro-editor#2578)
* Add LessEqual and GreaterEqual for SLoc * Fix relocate at the end of buffer when scrollmargin is 0 Fix the following issue: when scrollmargin is set to 0 and we move the cursor to the end of buffer (e.g. via Ctrl-End), the buffer view doesn't move. The cause is that the condition c.LessThan(w.Scroll(bEnd, -scrollmargin+1)) doesn't hold, since Scroll() takes care not to return a location beyond the end of buffer, so in this case Scroll() just returns bEnd.1 parent 4864590 commit 8ff7ec5
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
33 | 55 | | |
34 | 56 | | |
35 | 57 | | |
| |||
0 commit comments