Skip to content

Commit 748548c

Browse files
committed
bump
1 parent 609385c commit 748548c

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [3.7.1] - 2025-07-09
9+
10+
### Fixed
11+
12+
- Fixed broken text selection with soft_wrap=False
13+
814
## [3.7.0] - 2025-07-07
915

1016
### Added
@@ -2954,6 +2960,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
29542960
- New handler system for messages that doesn't require inheritance
29552961
- Improved traceback handling
29562962

2963+
[3.7.1]: https://github.com/Textualize/textual/compare/v3.7.0...v3.7.1
29572964
[3.7.0]: https://github.com/Textualize/textual/compare/v3.6.0...v3.7.0
29582965
[3.6.0]: https://github.com/Textualize/textual/compare/v3.5.0...v3.6.0
29592966
[3.5.0]: https://github.com/Textualize/textual/compare/v3.4.0...v3.5.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "3.7.0"
3+
version = "3.7.1"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"

src/textual/widgets/_text_area.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ def render_line(self, y: int) -> Strip:
11741174
absolute_y,
11751175
(
11761176
selection
1177-
if selection.contains_line(absolute_y)
1177+
if selection.contains_line(absolute_y) or self.soft_wrap
11781178
else selection.end[0] == absolute_y
11791179
),
11801180
(

tests/snapshot_tests/test_snapshots.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4347,3 +4347,28 @@ def on_mount(self) -> None:
43474347
self.query_one("#my-container").scroll_to(0, 3)
43484348

43494349
assert snap_compare(ScrollKeylineApp())
4350+
4351+
4352+
def test_textarea_select(snap_compare):
4353+
"""Regression test for https://github.com/Textualize/textual/issues/5939
4354+
4355+
You should see three lines selected, starting from the third character with the curser ending at the fifth character.
4356+
4357+
"""
4358+
4359+
class TextApp(App):
4360+
def compose(self) -> ComposeResult:
4361+
yield TextArea("Hello, World! " * 100)
4362+
4363+
snap_compare(
4364+
TextApp(),
4365+
press=(
4366+
"right",
4367+
"right",
4368+
"shift+down",
4369+
"shift+down",
4370+
"shift+down",
4371+
"shift+right",
4372+
"shift+right",
4373+
),
4374+
)

0 commit comments

Comments
 (0)