From 9871e12734770a5227c97989f1de824c5713eeb9 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Sun, 9 Oct 2016 17:48:31 -0700 Subject: [PATCH] Update for latest ncurses-rs --- Cargo.toml | 2 +- src/backend/curses.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e85009f..6577396 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ unicode-width = "0.1" [dependencies.ncurses] features = ["wide"] optional = true -version = "5.82.0" +version = "5.83.0" [dependencies.termion] optional = true diff --git a/src/backend/curses.rs b/src/backend/curses.rs index b240364..43d39cb 100644 --- a/src/backend/curses.rs +++ b/src/backend/curses.rs @@ -12,12 +12,12 @@ impl backend::Backend for NcursesBackend { ::std::env::set_var("ESCDELAY", "25"); ncurses::setlocale(ncurses::LcCategory::all, ""); ncurses::initscr(); - ncurses::keypad(unsafe { ncurses::stdscr }, true); + ncurses::keypad(unsafe { ncurses::stdscr() }, true); ncurses::noecho(); ncurses::cbreak(); ncurses::start_color(); ncurses::curs_set(ncurses::CURSOR_VISIBILITY::CURSOR_INVISIBLE); - ncurses::wbkgd(unsafe { ncurses::stdscr }, + ncurses::wbkgd(unsafe { ncurses::stdscr() }, ncurses::COLOR_PAIR(ColorStyle::Background.id())); NcursesBackend @@ -26,7 +26,7 @@ impl backend::Backend for NcursesBackend { fn screen_size(&self) -> (usize, usize) { let mut x: i32 = 0; let mut y: i32 = 0; - ncurses::getmaxyx(unsafe { ncurses::stdscr }, &mut y, &mut x); + ncurses::getmaxyx(unsafe { ncurses::stdscr() }, &mut y, &mut x); (x as usize, y as usize) }