Skip to content

Commit

Permalink
Merge pull request #1448 from Textualize/fix-clear
Browse files Browse the repository at this point in the history
fix and bump
  • Loading branch information
willmcgugan committed Dec 28, 2022
2 parents 29c0181 + 9092095 commit e3201ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.8.2] - 2022-12-28

### Fixed

- Fixed issue with TextLog.clear() https://github.com/Textualize/textual/issues/1447

## [0.8.1] - 2022-12-25

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual"
version = "0.8.1"
version = "0.8.2"
homepage = "https://github.com/Textualize/textual"
description = "Modern Text User Interface framework"
authors = ["Will McGugan <[email protected]>"]
Expand Down
3 changes: 2 additions & 1 deletion src/textual/widgets/_text_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def write(

def clear(self) -> None:
"""Clear the text log."""
del self.lines[:]
self.lines.clear()
self._line_cache.clear()
self._start_line = 0
self.max_width = 0
self.virtual_size = Size(self.max_width, len(self.lines))
Expand Down

0 comments on commit e3201ca

Please sign in to comment.