Skip to content

Commit

Permalink
Merge pull request #4551 from Textualize/auto-focus-bindings
Browse files Browse the repository at this point in the history
Auto focus bindings
  • Loading branch information
willmcgugan authored May 24, 2024
2 parents 6034065 + cbf385e commit fa37983
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +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/).

## Unreleased
## [0.63.3] - 2024-05-24

### Fixed

- Fixed `Footer` grid size https://github.com/Textualize/textual/pull/4545
- Fixed bindings not updated on auto focus https://github.com/Textualize/textual/pull/4551

### Changed

Expand Down Expand Up @@ -2012,6 +2013,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

[0.63.3]: https://github.com/Textualize/textual/compare/v0.63.2...v0.63.3
[0.63.2]: https://github.com/Textualize/textual/compare/v0.63.1...v0.63.2
[0.63.1]: https://github.com/Textualize/textual/compare/v0.63.0...v0.63.1
[0.63.0]: https://github.com/Textualize/textual/compare/v0.62.0...v0.63.0
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.63.2"
version = "0.63.3"
homepage = "https://github.com/Textualize/textual"
repository = "https://github.com/Textualize/textual"
documentation = "https://textual.textualize.io/"
Expand Down
2 changes: 1 addition & 1 deletion src/textual/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
from ._worker_manager import WorkerManager
from .actions import ActionParseResult, SkipAction
from .await_remove import AwaitRemove
from .binding import Binding, BindingType
from .binding import Binding, BindingType, _Bindings
from .command import CommandPalette, Provider
from .css.errors import StylesheetError
from .css.query import NoMatches
Expand Down
1 change: 1 addition & 0 deletions src/textual/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ def scroll_to_center(widget: Widget) -> None:
self.log.debug(widget, "was focused")

self._update_focus_styles(focused, blurred)
self.call_after_refresh(self.refresh_bindings)

def _extend_compose(self, widgets: list[Widget]) -> None:
"""Insert Textual's own internal widgets.
Expand Down
2 changes: 1 addition & 1 deletion src/textual/widgets/_footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def render(self) -> Text:
key_display = self.key_display
if self.upper_case_keys:
key_display = key_display.upper()
if key_display.lower().startswith("ctrl+"):
if self.ctrl_to_caret and key_display.lower().startswith("ctrl+"):
key_display = "^" + key_display.split("+", 1)[1]
description = self.description
if self.compact:
Expand Down

0 comments on commit fa37983

Please sign in to comment.