<commit_before>#include "ncurses_display_driver.hpp"

#include "document/url_line_element.hpp"
#include "document/code_line_element.hpp"
#include "document/bold_line_element.hpp"
#include "document/italic_line_element.hpp"

#include <cassert>

#include <unistd.h>

#include <iostream>
using namespace std;

#define WIN_TITLE_PAIR 1
#define TITLE1_PAIR 2
#define ULIST1_PAIR 3
#define RED_PAIR 4
#define COLOR_NONE -1

NcursesDisplayDriver::NcursesDisplayDriver() :
	DisplayDriver(true), _stdscr(initscr()),
	_width(COLS),
	_title_window(newwin(1,_width,0,0)),
	_display_window(newwin(LINES-4,_width,2,0)),
	_footer_window(newwin(1, _width, LINES-1, 0)),
	_url_window(newwin(1, _width, 2, 0)),
	_display_offset(0) {
	//Check if all windows have been initialized
	while(!_title_window) {
		_title_window = newwin(1,_width,0,0);
	}
	
	while(!_display_window) {
		_display_window = newwin(LINES-4,_width,2,0);
	}

	while(!_footer_window) {
		_footer_window = newwin(1, _width, LINES-1, 0);
	}
	assert(has_colors());

	// Begin ncurses mode
	cbreak();
	noecho();
	keypad(stdscr, TRUE);

	// Set up colors
	start_color();
	use_default_colors();
	init_pair(WIN_TITLE_PAIR, COLOR_YELLOW, COLOR_NONE);
	init_pair(TITLE1_PAIR, COLOR_BLUE, COLOR_NONE);
	init_pair(ULIST1_PAIR, COLOR_CYAN, COLOR_NONE);
	init_pair(RED_PAIR, COLOR_RED, COLOR_NONE);

	// Refresh screen, to enable the windows
	refresh();
}

NcursesDisplayDriver::~NcursesDisplayDriver() {
	endwin();
}<commit_msg>Hide cursor in NcursesDisplayDriver<commit_after>#include "ncurses_display_driver.hpp"

#include "document/url_line_element.hpp"
#include "document/code_line_element.hpp"
#include "document/bold_line_element.hpp"
#include "document/italic_line_element.hpp"

#include <cassert>

#include <unistd.h>

#include <iostream>
using namespace std;

#define WIN_TITLE_PAIR 1
#define TITLE1_PAIR 2
#define ULIST1_PAIR 3
#define RED_PAIR 4
#define COLOR_NONE -1

NcursesDisplayDriver::NcursesDisplayDriver() :
	DisplayDriver(true), _stdscr(initscr()),
	_width(COLS),
	_title_window(newwin(1,_width,0,0)),
	_display_window(newwin(LINES-4,_width,2,0)),
	_footer_window(newwin(1, _width, LINES-1, 0)),
	_url_window(newwin(1, _width, 2, 0)),
	_display_offset(0) {
	//Check if all windows have been initialized
	while(!_title_window) {
		_title_window = newwin(1,_width,0,0);
	}
	
	while(!_display_window) {
		_display_window = newwin(LINES-4,_width,2,0);
	}

	while(!_footer_window) {
		_footer_window = newwin(1, _width, LINES-1, 0);
	}
	assert(has_colors());

	// Begin ncurses mode
	cbreak();
	noecho();
	keypad(stdscr, TRUE);
	curs_set(0);

	// Set up colors
	start_color();
	use_default_colors();
	init_pair(WIN_TITLE_PAIR, COLOR_YELLOW, COLOR_NONE);
	init_pair(TITLE1_PAIR, COLOR_BLUE, COLOR_NONE);
	init_pair(ULIST1_PAIR, COLOR_CYAN, COLOR_NONE);
	init_pair(RED_PAIR, COLOR_RED, COLOR_NONE);

	// Refresh screen, to enable the windows
	refresh();
}

NcursesDisplayDriver::~NcursesDisplayDriver() {
	endwin();
}
{'fraction_non_alphanumeric': 0.1351078167115903, 'fraction_numerical': 0.02122641509433962, 'mean_word_length': 6.731770833333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6605353', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1198, 'n_words': 208}