Skip to content

Commit

Permalink
Add explanatory comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Sirringhaus committed Jul 5, 2022
1 parent 36e2cde commit bd247ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zellij-server/src/panes/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ pub struct SearchResult {
}

impl SearchResult {
/// This is only used for Debug formatting Grid, which itself is only used
/// for tests.
fn mark_search_results_in_row(&self, row: &mut Cow<Row>, ridx: usize) {
for s in &self.selections {
if s.contains_row(ridx) {
Expand Down Expand Up @@ -346,6 +348,8 @@ impl SearchResult {
}
}

/// Search a row and its tail.
/// The tail are all the non-canonical lines below `row`, with `row` not necessarily being canonical itself.
fn search_row(&self, mut ridx: usize, row: &Row, tail: &[&Row]) -> Vec<Selection> {
#[derive(Debug)]
enum SearchSource<'a> {
Expand Down

0 comments on commit bd247ce

Please sign in to comment.