diff --git a/src/hosts/main.py b/src/hosts/main.py index 19e1aa1..c685d7a 100644 --- a/src/hosts/main.py +++ b/src/hosts/main.py @@ -226,6 +226,12 @@ class HostsManagerApp(App): self.selected_entry_index = event.list_view.index or 0 self.update_entry_details() + def on_list_view_highlighted(self, event: ListView.Highlighted) -> None: + """Handle entry highlighting (cursor movement) in the left pane.""" + if event.list_view.id == "entries-list": + self.selected_entry_index = event.list_view.index or 0 + self.update_entry_details() + def action_reload(self) -> None: """Reload the hosts file.""" self.load_hosts_file()