Skip to content

Commit

Permalink
chore: backward/forward => up/down
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Dec 15, 2024
1 parent f54bb9f commit fd78850
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions promkit/src/core/jsonstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl JsonStream {
}

/// Moves the cursor backward through JSON stream.
pub fn backward(&mut self) -> bool {
pub fn up(&mut self) -> bool {
let index = self.rows.up(self.position);
let ret = index != self.position;
self.position = index;
Expand All @@ -57,7 +57,7 @@ impl JsonStream {
}

/// Moves the cursor forward through JSON stream.
pub fn forward(&mut self) -> bool {
pub fn down(&mut self) -> bool {
let index = self.rows.down(self.position);
let ret = index != self.position;
self.position = index;
Expand Down
4 changes: 2 additions & 2 deletions promkit/src/preset/json/keymap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn default(
row: _,
modifiers: KeyModifiers::NONE,
}) => {
renderer.json_state.stream.backward();
renderer.json_state.stream.up();
}

Event::Key(KeyEvent {
Expand All @@ -66,7 +66,7 @@ pub fn default(
row: _,
modifiers: KeyModifiers::NONE,
}) => {
renderer.json_state.stream.forward();
renderer.json_state.stream.down();
}

// Fold/Unfold
Expand Down

0 comments on commit fd78850

Please sign in to comment.