<commit_before>#include <vector>
#include <string>
#include <stdlib.h>
#include <ncurses.h>
#include <iostream>

#include "key_aliases.hh"
#include "command_listeners.hh"
#include "contents.hh"
#include "file_contents.hh"
#include "show_message.hh"

void quit_command(contents&, boost::optional<int>) {
    endwin();
    exit(0);
}

static bool key_test_handle(char);

static contents key_test(new mode("Key Test", key_test_handle));

static bool key_test_handle(char other) {
    move(key_test.y, key_test.x);
    if(other == _resize) return true;
    if(other == ':') {
        clear_message();
        command_executor(key_test, boost::none);
        return true;
    }
    printw("'%c':%d", other, other);

    key_test.x += 10;
    if(key_test.x >= get_contents().max_x) {
        key_test.x = 0;
        key_test.y++;
    }
    if(key_test.y >= get_contents().max_y) {
        key_test.y = 1;
    }
    return true;
}

void key_test_command(contents& cont, boost::optional<int>) {
    key_test.refresh = false;
    key_test.y = 1;
    key_test.x = 1;
    move(0,0);
    printw("[Key test: type anything]");
    cont = key_test;
}
<commit_msg>Eliminate undeleted data<commit_after>#include <vector>
#include <string>
#include <stdlib.h>
#include <ncurses.h>
#include <iostream>

#include "key_aliases.hh"
#include "command_listeners.hh"
#include "contents.hh"
#include "file_contents.hh"
#include "show_message.hh"

void quit_command(contents&, boost::optional<int>) {
    endwin();
    exit(0);
}

static bool key_test_handle(char);

static contents key_test(new mode("Key Test", key_test_handle));

static bool key_test_handle(char other) {
    move(key_test.y, key_test.x);
    if(other == _resize) return true;
    if(other == ':') {
        clear_message();
        command_executor(key_test, boost::none);
        return true;
    }
    printw("'%c':%d", other, other);

    key_test.x += 10;
    if(key_test.x >= get_contents().max_x) {
        key_test.x = 0;
        key_test.y++;
    }
    if(key_test.y >= get_contents().max_y) {
        key_test.y = 1;
    }
    return true;
}

void key_test_command(contents& cont, boost::optional<int>) {
    key_test.delete_mode = true;
    key_test.refresh = false;
    key_test.y = 1;
    key_test.x = 1;
    move(0,0);
    printw("[Key test: type anything]");
    cont = key_test;
}

{'fraction_non_alphanumeric': 0.15598290598290598, 'fraction_numerical': 0.007692307692307693, 'mean_word_length': 3.4421252371916506, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '4587363', 'n_tokens_mistral': 883, 'n_tokens_neox': 865, 'n_words': 170}