Skip to content

Commit

Permalink
fix: revert filter as of v0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Sep 24, 2024
1 parent 3d1363c commit ae73e97
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions promkit/src/core/json/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ impl PaneFactory for State {
styled_json
.into_iter()
.enumerate()
.filter(|(i, _)| {
*i >= self.stream.cursor.cross_contents_position()
&& *i < self.stream.cursor.cross_contents_position() + height
})
.fold((vec![], 0), |(mut acc, pos), (_, item)| {
let rows = item.matrixify(width as usize, height, 0).0;
if pos < self.stream.cursor.cross_contents_position() + height {
Expand Down

0 comments on commit ae73e97

Please sign in to comment.