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

Curses example not working #329

Open
MichaelMackus opened this issue Jan 14, 2023 · 1 comment
Open

Curses example not working #329

MichaelMackus opened this issue Jan 14, 2023 · 1 comment

Comments

@MichaelMackus
Copy link

MichaelMackus commented Jan 14, 2023

I get the following trying to run the examples in curses mode:

error[E0609]: no field `fitscreen` on type `curses::InitHints`
   --> bracket-terminal/src/initializer.rs:455:29
    |
455 |         self.platform_hints.fitscreen = fitscreen;
    |                             ^^^^^^^^^ help: a field with a similar name exists: `fullscreen`

Here's the command I'm using to run the curses example:

cargo run --example colorfont  --no-default-features --features "curses"

I'm using the latest code in git 0d2d5e6

Platform is linux using ncurses

@zgrow
Copy link

zgrow commented Feb 15, 2023

Hello, I've run into this same issue myself.

Adding the following lines to bracket-terminal/src/hal/curses/mod.rs was sufficient to fix this for me locally:

pub struct InitHints {
    ...
+   pub fitscreen: bool
}

impl InitHints {
    pub fn new() -> Self {
        Self {
            ...
+           fitscreen: false
        }
    }
}

Not sure if this is stable, but the crossterm module uses the same lines, so I'm hopeful 😄 It looks to me as though the curses module was overlooked when the fitscreen option was added some time ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants