1 | -- Include this at the appropriate place in the editor. |
2 | |
3 | if curX < scrollX then scrollX = curX end |
4 | if curY < scrollY then scrollY = curY end |
5 | scrollX = math.max(scrollX, curX-displayCols+1) |
6 | scrollY = math.max(scrollY, curY-displayRows+1) |
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 241 | [visualize] |
| Snippet ID: | #192 |
| Snippet name: | Automatic scrolling for editor |
| Eternal ID of this version: | #192/1 |
| Text MD5: | 198821395fb53cf1c196ae04fe86f407 |
| Author: | stefan |
| Category: | editors |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2014-01-19 01:31:39 |
| Source code size: | 241 bytes / 6 lines |
| Pitched / IR pitched: | Yes / Yes |
| Views / Downloads: | 1124 / 553 |
| Referenced in: | [show references] |