diff --git a/CMakeLists.txt b/CMakeLists.txt index bb4a4d6..947c72e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(juci) -set(JUCI_VERSION "1.8.1") +set(JUCI_VERSION "1.8.1.1") set(CPACK_PACKAGE_NAME "jucipp") set(CPACK_PACKAGE_CONTACT "Ole Christian Eidheim ") diff --git a/src/config.cpp b/src/config.cpp index 663864d..86f3954 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -205,6 +205,7 @@ void Config::read(const JSON &cfg) { terminal.clear_on_compile = terminal_json.boolean("clear_on_compile", JSON::ParseOptions::accept_string); terminal.clear_on_run_command = terminal_json.boolean("clear_on_run_command", JSON::ParseOptions::accept_string); terminal.hide_entry_on_run_command = terminal_json.boolean("hide_entry_on_run_command", JSON::ParseOptions::accept_string); + terminal.word_wrap = terminal_json.boolean("word_wrap", JSON::ParseOptions::accept_string); auto log_json = cfg.object("log"); log.libclang = log_json.boolean("libclang", JSON::ParseOptions::accept_string); @@ -319,7 +320,8 @@ std::string Config::default_config() { "font": "", "clear_on_compile": true, "clear_on_run_command": false, - "hide_entry_on_run_command": true + "hide_entry_on_run_command": true, + "word_wrap": false }, "project": { "default_build_path_comment": "Use to insert the project top level directory name", diff --git a/src/config.hpp b/src/config.hpp index ebc0e15..eda7a29 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -28,6 +28,7 @@ public: bool clear_on_compile; bool clear_on_run_command; bool hide_entry_on_run_command; + bool word_wrap; }; class Project { diff --git a/src/terminal.cpp b/src/terminal.cpp index 793e45b..9efeb23 100644 --- a/src/terminal.cpp +++ b/src/terminal.cpp @@ -590,6 +590,8 @@ void Terminal::async_print(std::string message, bool bold) { } void Terminal::configure() { + set_wrap_mode(Config::get().terminal.word_wrap ? Gtk::WrapMode::WRAP_WORD_CHAR : Gtk::WrapMode::WRAP_NONE); + link_tag->property_foreground_rgba() = get_style_context()->get_color(Gtk::StateFlags::STATE_FLAG_LINK); auto normal_color = get_style_context()->get_color(Gtk::StateFlags::STATE_FLAG_NORMAL);