mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Remove some more dead code
This commit is contained in:
parent
606b668fff
commit
aa50e4f8c4
1 changed files with 0 additions and 23 deletions
|
@ -132,24 +132,6 @@ impl<'a> ExecutionContext {
|
|||
ParsedSourceRef::clone(&self.pstree.borrow())
|
||||
}
|
||||
|
||||
/// Returns the current line number, indexed from 1. Updates cached line ranges.
|
||||
pub fn get_current_line_number(&self) -> Option<usize> {
|
||||
let line_offset = self.line_offset_of_executing_node()?;
|
||||
// The offset is 0 based; the number is 1 based.
|
||||
Some(line_offset + 1)
|
||||
}
|
||||
|
||||
/// Returns the 0-based source offset, or None.
|
||||
pub fn get_current_source_offset(&self) -> Option<usize> {
|
||||
self.line_counter.borrow_mut().source_offset_of_node()
|
||||
}
|
||||
|
||||
/// Returns the source string.
|
||||
pub fn get_source(&self) -> WString {
|
||||
// todo!("don't clone");
|
||||
self.pstree().src.clone()
|
||||
}
|
||||
|
||||
pub fn eval_node(
|
||||
&self,
|
||||
ctx: &OperationContext<'_>,
|
||||
|
@ -1924,11 +1906,6 @@ impl<'a> ExecutionContext {
|
|||
JobControl::none => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the 0-based line number of the current node.
|
||||
fn line_offset_of_executing_node(&self) -> Option<usize> {
|
||||
self.line_counter.borrow_mut().line_offset_of_node()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq)]
|
||||
|
|
Loading…
Reference in a new issue