a simple ncurses-based texteditor for the terminal
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
529 B

#include <iostream>
#include <ncurses/ncurses.hpp>
#include <Editor.hpp>
int main(int argc, char* argv[]) {
std::unique_ptr<groove::Editor> editor;
if (argc > 1)
editor = std::make_unique<groove::Editor>(argv[1]);
else
editor = std::make_unique<groove::Editor>();
groove::ncurses::ncurses curses;
curses.init();
curses.flush();
while(editor->mode() != groove::Mode::QUIT)
{
editor->render();
int input = getch(); // Blocking until input
editor->input(input);
}
curses.quit();
return 0;
}