Skip to content

Commit

Permalink
Merge pull request #5549 from Textualize/fix-smooth-scroll-vscode
Browse files Browse the repository at this point in the history
fix smooth scroll logic
  • Loading branch information
willmcgugan authored Feb 17, 2025
2 parents edca00b + e5897d0 commit c57bf45
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
7 changes: 7 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/).

## [2.0.4] - 2025-02-17

### Fixed

- Fixed smooth scrolling breaking mouse support in VSCode (and probably others) https://github.com/Textualize/textual/pull/5549

## [2.0.3] - 2025-02-16

### Fixed
Expand Down Expand Up @@ -2735,6 +2741,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
- New handler system for messages that doesn't require inheritance
- Improved traceback handling

[2.0.4]: https://github.com/Textualize/textual/compare/v2.0.3...v2.0.4
[2.0.3]: https://github.com/Textualize/textual/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/Textualize/textual/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/Textualize/textual/compare/v2.0.0...v2.0.1
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 = "2.0.3"
version = "2.0.4"
homepage = "https://github.com/Textualize/textual"
repository = "https://github.com/Textualize/textual"
documentation = "https://textual.textualize.io/"
Expand Down
27 changes: 13 additions & 14 deletions src/textual/drivers/linux_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,19 +454,18 @@ def process_selector_events(
def process_message(self, message: Message) -> None:
# intercept in-band window resize
if isinstance(message, TerminalSupportInBandWindowResize):
# If it is supported, enabled it
if message.supported and not message.enabled:
self._enable_in_band_window_resize()
self._in_band_window_resize = message.supported
elif message.enabled:
self._in_band_window_resize = message.supported
self._enable_mouse_pixels()
# Send up-to-date message
super().process_message(
TerminalSupportInBandWindowResize(
message.supported, self._in_band_window_resize
)
)
return
if message.supported:
self._in_band_window_resize = True
if message.enabled:
# Supported and enabled
super().process_message(message)
else:
# Supported, but not enabled
self._enable_in_band_window_resize()
super().process_message(
TerminalSupportInBandWindowResize(True, True)
)
self._enable_mouse_pixels()
return

super().process_message(message)

0 comments on commit c57bf45

Please sign in to comment.