Skip to content

Commit a4de208

Browse files
committed
changelog
1 parent 9bf6277 commit a4de208

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Added `GridLayout.max_column_width` https://github.com/Textualize/textual/pull/6228
1313
- Added `Content.fold` https://github.com/Textualize/textual/pull/6238
14+
- Added `strip_control_codes` to Content constructors https://github.com/Textualize/textual/pull/6238
15+
1416

1517
### Changed
1618

src/textual/content.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def extend(self, cells: int) -> "Span":
106106
return Span(start, end + cells, style)
107107
return self
108108

109-
def shift(self, distance: int) -> "Span":
109+
def _shift(self, distance: int) -> "Span":
110110
"""Shift a span a given distance.
111111
112112
Note that the start offset is clamped to 0.
@@ -794,7 +794,7 @@ def get_text_at(offset: int) -> "Content":
794794
else:
795795
text = self.plain[start:stop]
796796
spans = [
797-
span.shift(-start) for span in self._spans if span.end > start
797+
span._shift(-start) for span in self._spans if span.end > start
798798
]
799799
return Content(
800800
text, self._trim_spans(text, spans), strip_control_codes=False

0 commit comments

Comments
 (0)