fix auto complete for circle (#2903)
crcle Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -69,6 +69,7 @@ impl StdLibFnArg {
|
|||||||
|| self.type_ == "ExtrudeGroup"
|
|| self.type_ == "ExtrudeGroup"
|
||||||
|| self.type_ == "ExtrudeGroupSet"
|
|| self.type_ == "ExtrudeGroupSet"
|
||||||
|| self.type_ == "SketchSurface"
|
|| self.type_ == "SketchSurface"
|
||||||
|
|| self.type_ == "SketchSurfaceOrGroup"
|
||||||
{
|
{
|
||||||
return Ok(Some((index, format!("${{{}:{}}}", index, "%"))));
|
return Ok(Some((index, format!("${{{}:{}}}", index, "%"))));
|
||||||
} else if self.type_ == "TagDeclarator" && self.required {
|
} else if self.type_ == "TagDeclarator" && self.required {
|
||||||
@ -894,4 +895,11 @@ mod tests {
|
|||||||
}, ${2:%})${}"#
|
}, ${2:%})${}"#
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn get_autocomplete_snippet_circle() {
|
||||||
|
let circle_fn: Box<dyn StdLibFn> = Box::new(crate::std::shapes::Circle);
|
||||||
|
let snippet = circle_fn.to_autocomplete_snippet().unwrap();
|
||||||
|
assert_eq!(snippet, r#"circle([${0:3.14}, ${1:3.14}], ${2:3.14}, ${3:%})${}"#);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user