From d6f697a8028ad3579fc481b2f70eb5d1c8fb1f70 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 19 Apr 2018 13:04:59 +0200 Subject: [PATCH] Multiple cursors can now be enabled in preferences --- CMakeLists.txt | 2 +- README.md | 1 + src/config.cc | 1 + src/config.h | 1 + src/files.h | 1 + src/source.cc | 2 +- 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cb4471..319e931 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.8.8) project(juci) -set(JUCI_VERSION "1.4.1.1") +set(JUCI_VERSION "1.4.1.2") set(CPACK_PACKAGE_NAME "jucipp") set(CPACK_PACKAGE_CONTACT "Ole Christian Eidheim ") diff --git a/README.md b/README.md index 45ecc2a..5d2177f 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ See [language-server-protocol/specification.md](https://github.com/Microsoft/lan * Auto-indentation of C++ file buffers through [clang-format](http://clang.llvm.org/docs/ClangFormat.html) * Source minimap * Split view +* Multiple cursors * Full UTF-8 support * Wayland supported with GTK+ 3.20 or newer diff --git a/src/config.cc b/src/config.cc index 005bfea..ff44d64 100644 --- a/src/config.cc +++ b/src/config.cc @@ -171,6 +171,7 @@ void Config::read(const boost::property_tree::ptree &cfg) { source.wrap_lines = source_json.get("wrap_lines"); source.highlight_current_line = source_json.get("highlight_current_line"); source.show_line_numbers = source_json.get("show_line_numbers"); + source.enable_multiple_cursors = source_json.get("enable_multiple_cursors"); source.clang_format_style = source_json.get("clang_format_style"); source.clang_usages_threads = static_cast(source_json.get("clang_usages_threads")); auto pt_doc_search=cfg.get_child("documentation_searches"); diff --git a/src/config.h b/src/config.h index 738f357..6744245 100644 --- a/src/config.h +++ b/src/config.h @@ -85,6 +85,7 @@ public: bool wrap_lines; bool highlight_current_line; bool show_line_numbers; + bool enable_multiple_cursors; std::string clang_format_style; unsigned clang_usages_threads; diff --git a/src/files.h b/src/files.h index be24c6c..0040792 100644 --- a/src/files.h +++ b/src/files.h @@ -58,6 +58,7 @@ R"RAW( "wrap_lines": false, "highlight_current_line": true, "show_line_numbers": true, + "enable_multiple_cursors": false, "clang_format_style_comment": "IndentWidth, AccessModifierOffset and UseTab are set automatically. See http://clang.llvm.org/docs/ClangFormatStyleOptions.html", "clang_format_style": "ColumnLimit: 0, MaxEmptyLinesToKeep: 2, SpaceBeforeParens: Never, NamespaceIndentation: All, BreakBeforeBraces: Custom, BraceWrapping: {BeforeElse: true, BeforeCatch: true}", "clang_usages_threads_comment": "The number of threads used in finding usages in unparsed files. -1 corresponds to the number of cores available, and 0 disables the search", diff --git a/src/source.cc b/src/source.cc index 9e6b21c..5ced1c1 100644 --- a/src/source.cc +++ b/src/source.cc @@ -1632,7 +1632,7 @@ bool Source::View::on_key_press_event(GdkEventKey* key) { previous_non_modifier_keyval=last_keyval; last_keyval=key->keyval; - if(on_key_press_event_multiple_cursors(key)) + if(Config::get().source.enable_multiple_cursors && on_key_press_event_multiple_cursors(key)) return true; //Move cursor one paragraph down