From 38394278727428a7b7438f856ffcfdc1c00b57ea Mon Sep 17 00:00:00 2001 From: eidheim Date: Wed, 28 Oct 2015 15:00:05 +0100 Subject: [PATCH 1/2] Minor change to install.md and added define UBUNTU_BUGGED_MENU to LinuxMint. --- docs/install.md | 4 ++-- src/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/install.md b/docs/install.md index 95bcaa0..9693755 100644 --- a/docs/install.md +++ b/docs/install.md @@ -8,7 +8,7 @@ sudo apt-get install git cmake make g++ libclang-dev pkg-config libboost-system- Get juCi++ source, compile and install: ```sh -git clone --recursive http://github.com/cppit/jucipp +git clone --recursive https://github.com/cppit/jucipp cd jucipp cmake . make @@ -33,7 +33,7 @@ sudo apt-get install git cmake make g++ libclang-3.6-dev pkg-config libboost-sys Get juCi++ source, compile and install: ```sh -git clone --recursive http://github.com/cppit/jucipp +git clone --recursive https://github.com/cppit/jucipp cd jucipp cmake . make diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3d246e2..2da1c6f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,7 +15,7 @@ if(UNIX) #Checking if compiling on Ubuntu that has a buggy menu system if(LSB_RELEASE_BIN) execute_process(COMMAND ${LSB_RELEASE_BIN} -is OUTPUT_VARIABLE DISTRIBUTION OUTPUT_STRIP_TRAILING_WHITESPACE) - if(DISTRIBUTION STREQUAL Ubuntu) + if((DISTRIBUTION STREQUAL Ubuntu) OR (DISTRIBUTION STREQUAL LinuxMint)) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUBUNTU_BUGGED_MENU") endif() endif() From 7d4d55278651134cb98a461db1fffbfb995166af Mon Sep 17 00:00:00 2001 From: Ole Christian Eidheim Date: Sun, 1 Nov 2015 13:41:17 +0100 Subject: [PATCH 2/2] Fixes #77. --- src/source.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/source.cc b/src/source.cc index de59144..f2865f8 100644 --- a/src/source.cc +++ b/src/source.cc @@ -531,13 +531,11 @@ void Source::View::replace_all(const std::string &replacement) { void Source::View::paste() { auto text=Gtk::Clipboard::get()->wait_for_text(); - //replace stand-alone carriage returns (which makes clang return wrong line index) with newlines + + //remove carriage returns (which leads to crash) for(auto it=text.begin();it!=text.end();it++) { if(*it=='\r') { - auto it2=it; - it2++; - if(it2==text.end() || *it2!='\n') - text.replace(it, it2, "\n"); + it=text.erase(it); } }