File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -489,17 +489,17 @@ impl ContextProvider for BasicContextProvider {
489
489
if !selected_text. trim ( ) . is_empty ( ) {
490
490
task_variables. insert ( VariableName :: SelectedText , selected_text) ;
491
491
}
492
- let worktree_abs_path =
492
+ let worktree_root_dir =
493
493
buffer
494
494
. file ( )
495
495
. map ( |file| file. worktree_id ( cx) )
496
496
. and_then ( |worktree_id| {
497
497
self . worktree_store
498
498
. read ( cx)
499
499
. worktree_for_id ( worktree_id, cx)
500
- . map ( |worktree| worktree. read ( cx) . abs_path ( ) )
500
+ . map ( |worktree| worktree. read ( cx) . root_dir ( ) )
501
501
} ) ;
502
- if let Some ( worktree_path) = worktree_abs_path {
502
+ if let Some ( Some ( worktree_path) ) = worktree_root_dir {
503
503
task_variables. insert (
504
504
VariableName :: WorktreeRoot ,
505
505
worktree_path. to_string_lossy ( ) . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments