subtitles: Add more cutscenes to subtitle editor (#1588)

* fix repl-history saving

* subtitles: fix `\"` edge-case

* subtitles: add almost every remaining (current) cutscene

* merge: master

* subtitles: fix some crashes and disable `Remove Line` as it is broken
This commit is contained in:
Tyler Wilding
2022-07-02 15:32:52 -04:00
committed by GitHub
parent f763eb6bf0
commit 34d93e59ed
7 changed files with 405 additions and 56 deletions
+4 -8
View File
@@ -57,13 +57,9 @@ void ReplWrapper::add_to_history(const std::string& line) {
}
void ReplWrapper::save_history() {
std::filesystem::path path = file_util::get_user_config_dir();
file_util::create_dir_if_needed(path);
if (exists(path)) {
repl.history_save((path / ".opengoal.repl.history").string());
} else {
fmt::print("Couldn't save REPL history file to '{}'", path.string());
}
std::filesystem::path path = file_util::get_user_config_dir() / ".opengoal.repl.history";
file_util::create_dir_if_needed_for_file(path.string());
repl.history_save(path.string());
}
void ReplWrapper::load_history() {
@@ -71,7 +67,7 @@ void ReplWrapper::load_history() {
if (std::filesystem::exists(path)) {
repl.history_load(path.string());
} else {
fmt::print("Couldn't locate REPL history file at '{}'", path.string());
fmt::print("Couldn't locate REPL history file at '{}'\n", path.string());
}
}