pretty good
This commit is contained in:
@@ -69,9 +69,11 @@ class FlowAnalysisWidget(Vertical):
|
||||
if not self.flow_table:
|
||||
return
|
||||
|
||||
# Preserve cursor position
|
||||
# Preserve cursor and scroll positions
|
||||
cursor_row = self.flow_table.cursor_row
|
||||
cursor_column = self.flow_table.cursor_column
|
||||
scroll_x = self.flow_table.scroll_x
|
||||
scroll_y = self.flow_table.scroll_y
|
||||
selected_row_key = None
|
||||
if self.flow_table.rows and cursor_row < len(self.flow_table.rows):
|
||||
selected_row_key = list(self.flow_table.rows.keys())[cursor_row]
|
||||
@@ -108,6 +110,9 @@ class FlowAnalysisWidget(Vertical):
|
||||
# If original selection not found, try to maintain row position
|
||||
new_row = min(cursor_row, self.flow_table.row_count - 1)
|
||||
self.flow_table.move_cursor(row=new_row, column=cursor_column, animate=False)
|
||||
|
||||
# Restore scroll position
|
||||
self.flow_table.scroll_to(x=scroll_x, y=scroll_y, animate=False)
|
||||
|
||||
def _create_flow_row(self, flow_num: int, flow: 'FlowStats') -> List[Text]:
|
||||
"""Create main flow row with rich text formatting"""
|
||||
|
||||
Reference in New Issue
Block a user