more tests for scrolling

This commit is contained in:
2021-10-25 16:20:30 +02:00
parent 3662b47651
commit 603b748180
5 changed files with 173 additions and 18 deletions

15
scribble.py Normal file
View File

@@ -0,0 +1,15 @@
import math
before = []#[0,1,2,3]
after = ["a","b","c","d"]
both = before + after
scroll = -3
lines = 1
start = len(before) + scroll
if start+lines < len(both):
result = both[start:start+lines]
else:
result = both[-lines:]
print("%s" % result)