mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 14:01:20 -03:00
Remove additional call to Parser::shared()
This commit is contained in:
committed by
Peter Ammon
parent
832ed31687
commit
d36f94d96c
@@ -1941,13 +1941,13 @@ fn complete_custom(&mut self, cmd: &wstr, cmdline: &wstr, ad: &mut CustomArgData
|
||||
let wants_transient =
|
||||
(ad.wrap_depth > 0 || !ad.var_assignments.is_empty()) && !is_autosuggest;
|
||||
if wants_transient {
|
||||
let parser_ref = self.ctx.parser().shared();
|
||||
parser_ref
|
||||
let parser = self.ctx.parser();
|
||||
parser
|
||||
.libdata_mut()
|
||||
.transient_commandlines
|
||||
.push(cmdline.to_owned());
|
||||
_remove_transient = Some(ScopeGuard::new((), move |_| {
|
||||
parser_ref.libdata_mut().transient_commandlines.pop();
|
||||
parser.libdata_mut().transient_commandlines.pop();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user