Browse Source

Multiple cursors can now be enabled in preferences

merge-requests/382/head
eidheim 8 years ago
parent
commit
d6f697a802
  1. 2
      CMakeLists.txt
  2. 1
      README.md
  3. 1
      src/config.cc
  4. 1
      src/config.h
  5. 1
      src/files.h
  6. 2
      src/source.cc

2
CMakeLists.txt

@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.8.8) cmake_minimum_required (VERSION 2.8.8)
project(juci) project(juci)
set(JUCI_VERSION "1.4.1.1") set(JUCI_VERSION "1.4.1.2")
set(CPACK_PACKAGE_NAME "jucipp") set(CPACK_PACKAGE_NAME "jucipp")
set(CPACK_PACKAGE_CONTACT "Ole Christian Eidheim <eidheim@gmail.com>") set(CPACK_PACKAGE_CONTACT "Ole Christian Eidheim <eidheim@gmail.com>")

1
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) * Auto-indentation of C++ file buffers through [clang-format](http://clang.llvm.org/docs/ClangFormat.html)
* Source minimap * Source minimap
* Split view * Split view
* Multiple cursors
* Full UTF-8 support * Full UTF-8 support
* Wayland supported with GTK+ 3.20 or newer * Wayland supported with GTK+ 3.20 or newer

1
src/config.cc

@ -171,6 +171,7 @@ void Config::read(const boost::property_tree::ptree &cfg) {
source.wrap_lines = source_json.get<bool>("wrap_lines"); source.wrap_lines = source_json.get<bool>("wrap_lines");
source.highlight_current_line = source_json.get<bool>("highlight_current_line"); source.highlight_current_line = source_json.get<bool>("highlight_current_line");
source.show_line_numbers = source_json.get<bool>("show_line_numbers"); source.show_line_numbers = source_json.get<bool>("show_line_numbers");
source.enable_multiple_cursors = source_json.get<bool>("enable_multiple_cursors");
source.clang_format_style = source_json.get<std::string>("clang_format_style"); source.clang_format_style = source_json.get<std::string>("clang_format_style");
source.clang_usages_threads = static_cast<unsigned>(source_json.get<int>("clang_usages_threads")); source.clang_usages_threads = static_cast<unsigned>(source_json.get<int>("clang_usages_threads"));
auto pt_doc_search=cfg.get_child("documentation_searches"); auto pt_doc_search=cfg.get_child("documentation_searches");

1
src/config.h

@ -85,6 +85,7 @@ public:
bool wrap_lines; bool wrap_lines;
bool highlight_current_line; bool highlight_current_line;
bool show_line_numbers; bool show_line_numbers;
bool enable_multiple_cursors;
std::string clang_format_style; std::string clang_format_style;
unsigned clang_usages_threads; unsigned clang_usages_threads;

1
src/files.h

@ -58,6 +58,7 @@ R"RAW(
"wrap_lines": false, "wrap_lines": false,
"highlight_current_line": true, "highlight_current_line": true,
"show_line_numbers": 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_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_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", "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",

2
src/source.cc

@ -1632,7 +1632,7 @@ bool Source::View::on_key_press_event(GdkEventKey* key) {
previous_non_modifier_keyval=last_keyval; previous_non_modifier_keyval=last_keyval;
last_keyval=key->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; return true;
//Move cursor one paragraph down //Move cursor one paragraph down

Loading…
Cancel
Save