Skip to content

Commit 9b4fedf

Browse files
committed
fix: unknown identifier code actions with nested open
1 parent 4338a8b commit 9b4fedf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Lean/Server/Completion/CompletionUtils.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ structure ContextualizedCompletionInfo where
4141
ctx : ContextInfo
4242
info : CompletionInfo
4343

44-
partial def minimizeGlobalIdentifierInContext (currNamespace : Name) (openDecls : List OpenDecl) (id : Name)
44+
def minimizeGlobalIdentifierInContext (currNamespace : Name) (openDecls : List OpenDecl) (id : Name)
4545
: Name := Id.run do
4646
let mut minimized := shortenIn id currNamespace
4747
for openDecl in openDecls do
@@ -68,7 +68,7 @@ where
6868
else if contextNamespace.isPrefixOf id then
6969
id.replacePrefix contextNamespace .anonymous
7070
else
71-
shortenIn id contextNamespace.getPrefix
71+
id
7272

7373
def unfoldDefinitionGuarded? (e : Expr) : MetaM (Option Expr) :=
7474
try Lean.Meta.unfoldDefinition? e catch _ => pure none

0 commit comments

Comments
 (0)