From 617c882b6c706c98e496a20eecb70a35eccab047 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Fri, 17 Mar 2023 16:27:16 -0500 Subject: [PATCH] added getyxmax TODO: See why files of type "Unicode text, UTF-8 text" works but "Unicode text, UTF-8 (with BOM) text, with CRLF line terminators" does not. TODO: add menu to select works, add line numbering, scrolling ability, and bookmarks --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index 227d5e4..0afa9d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,13 @@ fn main() -> std::io::Result<()> { //screen init function fn screen(line: &str){ + let mut stdscr: i8 = 0; + let mut w: i32 = 0; //width + let mut h: i32 = 0; //height + ncurses::getmaxyx(&mut stdscr, &mut h, &mut w); + ncurses::initscr(); + ncurses::clear(); ncurses::addstr(line); ncurses::refresh(); ncurses::getch();