fix(wireguard): Fix completions

This commit is contained in:
Myzel394 2024-08-19 23:04:03 +02:00
parent 6dde93c521
commit 70b05e19fe
No known key found for this signature in database
GPG Key ID: DEC4AAB876F73185

View File

@ -201,8 +201,12 @@ func (p wireguardSection) getCompletionsForPropertyLine(
option, found := options[property.Key.Name] option, found := options[property.Key.Name]
if !found { if !found {
if character < property.Separator.Location.Start {
return nil, propertyNotFullyTypedError{}
} else {
return nil, propertyNotFoundError{} return nil, propertyNotFoundError{}
} }
}
if property.Value == nil { if property.Value == nil {
if character >= property.Separator.Location.End { if character >= property.Separator.Location.End {