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() 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); } }