Add handler for entry highlighting in the left pane
This commit is contained in:
		
							parent
							
								
									b8e4b29f04
								
							
						
					
					
						commit
						69ee221a63
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue