We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e0feb3 commit cca075aCopy full SHA for cca075a
bpython/cli.py
@@ -123,24 +123,6 @@ class ShowListState:
123
wl: int = 0
124
125
126
-def calculate_screen_lines(
127
- tokens: MutableMapping[_TokenType, str], width: int, cursor: int = 0
128
-) -> int:
129
- """Given a stream of tokens and a screen width plus an optional
130
- initial cursor position, return the amount of needed lines on the
131
- screen."""
132
- lines = 1
133
- pos = cursor
134
- for (token, value) in tokens:
135
- if token is Token.Text and value == "\n":
136
- lines += 1
137
- else:
138
- pos += len(value)
139
- lines += pos // width
140
- pos %= width
141
- return lines
142
-
143
144
def forward_if_not_current(func: F) -> F:
145
@functools.wraps(func)
146
def newfunc(self, *args, **kwargs): # type: ignore
0 commit comments