mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1665 from davep/workaround-windows-paste
Workaround for a Windows paste issue
This commit is contained in:
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Fixed relative units in `grid-rows` and `grid-columns` being computed with respect to the wrong dimension https://github.com/Textualize/textual/issues/1406
|
- Fixed relative units in `grid-rows` and `grid-columns` being computed with respect to the wrong dimension https://github.com/Textualize/textual/issues/1406
|
||||||
- Programmatically setting `overflow_x`/`overflow_y` refreshes the layout correctly https://github.com/Textualize/textual/issues/1616
|
- Programmatically setting `overflow_x`/`overflow_y` refreshes the layout correctly https://github.com/Textualize/textual/issues/1616
|
||||||
- Fixed double-paste into `Input` https://github.com/Textualize/textual/issues/1657
|
- Fixed double-paste into `Input` https://github.com/Textualize/textual/issues/1657
|
||||||
|
- Added a workaround for an apparent Windows Terminal paste issue https://github.com/Textualize/textual/issues/1661
|
||||||
|
|
||||||
## [0.10.1] - 2023-01-20
|
## [0.10.1] - 2023-01-20
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,10 @@ class XTermParser(Parser[events.Event]):
|
|||||||
# ESC from the closing bracket, since at that point we didn't know what
|
# ESC from the closing bracket, since at that point we didn't know what
|
||||||
# the full escape code was.
|
# the full escape code was.
|
||||||
pasted_text = "".join(paste_buffer[:-1])
|
pasted_text = "".join(paste_buffer[:-1])
|
||||||
on_token(events.Paste(self.sender, text=pasted_text))
|
# Note the removal of NUL characters: https://github.com/Textualize/textual/issues/1661
|
||||||
|
on_token(
|
||||||
|
events.Paste(self.sender, text=pasted_text.replace("\x00", ""))
|
||||||
|
)
|
||||||
paste_buffer.clear()
|
paste_buffer.clear()
|
||||||
|
|
||||||
character = ESC if use_prior_escape else (yield read1())
|
character = ESC if use_prior_escape else (yield read1())
|
||||||
|
|||||||
Reference in New Issue
Block a user