• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wllfaria / glyph / 16432406946

22 Jul 2025 01:43AM UTC coverage: 11.519% (-0.8%) from 12.321%
16432406946

push

github

wllfaria
command handler draft

0 of 55 new or added lines in 7 files covered. (0.0%)

1 existing line in 1 file now uncovered.

69 of 599 relevant lines covered (11.52%)

3.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/glyph-core/src/command_handler/buffer_command_handler.rs
1
use super::{CommandContext, CommandHandler, CommandHandlerResult};
2
use crate::key_mapper::Command;
3

4
#[derive(Debug, Default)]
5
pub struct BufferCommandHandler {}
6

7
impl CommandHandler for BufferCommandHandler {
NEW
8
    fn handle_commands(&mut self, ctx: &mut CommandContext<'_>) -> CommandHandlerResult {
×
NEW
9
        let view = ctx.views.get_mut_active_view();
×
NEW
10
        let cursor = view.cursors.first_mut().unwrap();
×
11

NEW
12
        for command in ctx.commands.iter() {
×
NEW
13
            match command {
×
NEW
14
                Command::MoveCursorLeft => cursor.x = cursor.x.saturating_sub(1),
×
NEW
15
                Command::MoveCursorDown => cursor.y = cursor.y.saturating_add(1),
×
NEW
16
                Command::MoveCursorUp => cursor.y = cursor.y.saturating_sub(1),
×
NEW
17
                Command::MoveCursorRight => cursor.x = cursor.x.saturating_add(1),
×
18
                // TODO: this should be temporary
NEW
19
                Command::Quit => *ctx.should_quit = true,
×
20
            }
21
        }
22

NEW
23
        CommandHandlerResult::Consumed
×
24
    }
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc