Text editor using ncurses library