Browse Source

Merge pull request #78 from eidheim/master

Fixes #77
merge-requests/365/head
Ole Christian Eidheim 10 years ago
parent
commit
05bcac4b4b
  1. 4
      docs/install.md
  2. 2
      src/CMakeLists.txt
  3. 8
      src/source.cc

4
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

2
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()

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

Loading…
Cancel
Save