Skip to content

Commit

Permalink
add support for moving forward tabs
Browse files Browse the repository at this point in the history
This adds support for moving forward tabs in the grid using `CSI n I`.
This sequence behaves like using tabs `\t` but also accepts a count
argument to move multiple tabs forward.
  • Loading branch information
aymanbagabas committed Dec 25, 2024
1 parent 67e64ae commit 0a72399
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ language: 'en'
- Kitty keyboard protocol is now enabled by default.
- Allow `Renderer` to be configured cross-platform by `Platform` property.
- Add `ToggleFullscreen` to configurable actions.
- Support for `CSI n I` (Cursor Forward Tabulation) to move the cursor forward by a specified number of tabs.

## 0.2.2

Expand Down
8 changes: 7 additions & 1 deletion rio-backend/src/crosswords/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2377,7 +2377,13 @@ impl<U: EventListener> Handler for Crosswords<U> {

#[inline]
fn move_forward_tabs(&mut self, count: u16) {
trace!("[unimplemented] Moving forward {} tabs", count);
trace!("Moving forward {} tabs", count);

self.put_tab(count);
let cell = self.grid.cursor_cell();
if cell.c == ' ' {
self.damage_cursor();
}
}

#[inline]
Expand Down

0 comments on commit 0a72399

Please sign in to comment.