diff --git a/CHANGELOG.md b/CHANGELOG.md index 56b6aff24..9de584fe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically https://github.com/Textualize/textual/issues/2459 +- Added `always_update` as an optional argument for `reactive.var` ## [0.23.0] - 2023-05-03 diff --git a/src/textual/widgets/_tree.py b/src/textual/widgets/_tree.py index 9d5d9e0d2..85255cf1e 100644 --- a/src/textual/widgets/_tree.py +++ b/src/textual/widgets/_tree.py @@ -429,7 +429,7 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True): """Show the root of the tree.""" hover_line = var(-1) """The line number under the mouse pointer, or -1 if not under the mouse pointer.""" - cursor_line = var(-1) + cursor_line = var(-1, always_update=True) """The line with the cursor, or -1 if no cursor.""" show_guides = reactive(True) """Enable display of tree guide lines."""