more tests for scrolling
This commit is contained in:
15
scribble.py
Normal file
15
scribble.py
Normal 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)
|
||||
Reference in New Issue
Block a user