Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-jpq committed Dec 9, 2024
1 parent d7953de commit 30cbcf8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chadtree/transitions/redraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _update(

async def redraw(state: State, focus: Optional[PurePath]) -> Derived:
derived = await _derived(state)
focus_row = derived.path_row_lookup.get(focus) if focus else None
focus_row = derived.path_row_lookup.get(focus) if state.follow and focus else None
buf_name = _buf_name(state.root.path)

ns = await Nvim.create_namespace(_NS)
Expand Down
2 changes: 1 addition & 1 deletion chadtree/transitions/shared/current.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def new_current_file(state: State, current: PurePath) -> Stage:
else:
new_state = await forward(state, current=current)

focus = current if state.follow else None
focus = new_state.current
return Stage(new_state, focus=focus)


Expand Down
2 changes: 1 addition & 1 deletion chadtree/transitions/shared/refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def refresh(state: State) -> Stage:
current_ancestors if state.follow else frozenset()
)
new_index = index if new_current else index | parent_paths
focus = current if state.follow else None
focus = current

new_state = await forward(
state,
Expand Down

0 comments on commit 30cbcf8

Please sign in to comment.