-- Include this at the appropriate place in the editor. if curX < scrollX then scrollX = curX end if curY < scrollY then scrollY = curY end scrollX = math.max(scrollX, curX-displayCols+1) 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: | 1125 / 554 |
| Referenced in: | #185 - Editor 2.1 #191 - Scrolling for editor #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |