mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00:00
Remove additional call to Parser::shared()
This commit is contained in:
parent
832ed31687
commit
d36f94d96c
1 changed files with 3 additions and 3 deletions
|
@ -1941,13 +1941,13 @@ impl<'ctx> Completer<'ctx> {
|
||||||
let wants_transient =
|
let wants_transient =
|
||||||
(ad.wrap_depth > 0 || !ad.var_assignments.is_empty()) && !is_autosuggest;
|
(ad.wrap_depth > 0 || !ad.var_assignments.is_empty()) && !is_autosuggest;
|
||||||
if wants_transient {
|
if wants_transient {
|
||||||
let parser_ref = self.ctx.parser().shared();
|
let parser = self.ctx.parser();
|
||||||
parser_ref
|
parser
|
||||||
.libdata_mut()
|
.libdata_mut()
|
||||||
.transient_commandlines
|
.transient_commandlines
|
||||||
.push(cmdline.to_owned());
|
.push(cmdline.to_owned());
|
||||||
_remove_transient = Some(ScopeGuard::new((), move |_| {
|
_remove_transient = Some(ScopeGuard::new((), move |_| {
|
||||||
parser_ref.libdata_mut().transient_commandlines.pop();
|
parser.libdata_mut().transient_commandlines.pop();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue