Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Rust, [c selects comment block, ]c only selects the first line of the comment block #7223

Closed
David-Else opened this issue Jun 3, 2023 · 0 comments · Fixed by #7332
Closed
Labels
C-bug Category: This is a bug

Comments

@David-Else
Copy link
Contributor

Summary

In Rust, [c selects comment block, ]c only selects the first line of the comment block

Reproduction Steps

pub fn render_screen(game_state: &GameState, mut stdout: &Stdout) -> Result<()> {
    stdout.execute(terminal::Clear(terminal::ClearType::All))?;

    // ------------------------
    //  DRAW ON-SCREEN DISPLAY
    // ------------------------
    stdout
        .queue(cursor::MoveTo(7, 1))?
        .queue(style::Print(&game_state.screen_display_text))?
        .queue(cursor::MoveTo(7, 2))?
        .queue(style::Print(&game_state.time.to_string()))?;

    // ----------------------------
    //  DRAW ALL THE GAME ENTITIES
    // ----------------------------
    for entity in &game_state.entities {
        draw_entity(stdout, entity); // AsRef<T> takes a reference to the inner type of a Box
                                     // draw_entity(stdout, entity.as_ref())?; // AsRef<T> takes a reference to the inner type of a Box
    }

    // draw screen from queued buffer
    stdout.flush()?;
    Ok(())
}
  1. try [c and ]c multiple times and see that [c selects comment block, ]c only selects the first line of the comment block.

This is inconsistent and therefore I assume a bug.

Helix log

na

Platform

Linux

Terminal Emulator

Kitty

Helix Version

23.05-53-g8e2660b5 (built from master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant