simple text editor using terminal/curses.h