@@ -25,6 +25,7 @@ def feed(self, data):
25
25
self ._screen .scroll_to_bottom ()
26
26
self ._bytestream .feed (data )
27
27
self ._modified = True
28
+ print (self ._screen .tabstops )
28
29
29
30
def resize (self , lines , cols ):
30
31
self ._screen .scroll_to_bottom ()
@@ -104,6 +105,15 @@ def __init__(self, columns, lines, history, ratio):
104
105
105
106
super (CustomHistoryScreen , self ).__init__ (columns , lines )
106
107
108
+ # We do not agree with pyte about default tabstops
109
+ self .tabstops = set (range (8 , self .columns , 8 ))
110
+
111
+ def reset (self ):
112
+ super (CustomHistoryScreen , self ).reset ()
113
+
114
+ # Reset tab stops
115
+ self .tabstops = set (range (8 , self .columns , 8 ))
116
+
107
117
def scroll_to_bottom (self ):
108
118
"""
109
119
Ensure a screen is at the bottom of the history buffer
@@ -255,6 +265,9 @@ def resize(self, lines=None, columns=None):
255
265
# JW tweak - move cursor upwards if its out of bounds do not reset it
256
266
self .ensure_bounds (use_margins = True )
257
267
268
+ # Update tabstops to new screen size
269
+ self .tabstops = set (range (8 , self .columns , 8 ))
270
+
258
271
259
272
def take (n , iterable ):
260
273
"""Returns first n items of the iterable as a list."""
0 commit comments