Browse Source

Merge pull request #149 from eidheim/master

Most notably fixes a crash that might happen if contents of subdirectories changed
merge-requests/365/head
Ole Christian Eidheim 10 years ago
parent
commit
79f497a187
  1. 14
      docs/install.md
  2. 8
      src/directories.cc
  3. 1
      src/source.cc
  4. 2
      src/source_clang.cc

14
docs/install.md

@ -1,5 +1,14 @@
# juCi++ Installation Guide
- Linux
- [Debian/Ubuntu 15](#debianubuntu-15)
- [Ubuntu 14/Linux Mint 17](#ubuntu-14linux-mint-17)
- [Arch Linux](#arch-linux)
- OS X
- [Homebrew](#os-x-with-homebrew-httpbrewsh)
- Windows
- [MSYS 2](#windows-with-msys2-httpsmsys2githubio)
## Debian/Ubuntu 15
Install dependencies:
```sh
@ -34,6 +43,11 @@ sudo make install
```
##Arch Linux
Package available in the Arch User Repository:
https://aur.archlinux.org/packages/jucipp-git/
Alternatively, follow the instructions below.
Install dependencies:
```sh
#as root

8
src/directories.cc

@ -57,7 +57,13 @@ Directories::Directories() : Gtk::TreeView(), stop_update_thread(false) {
});
signal_row_collapsed().connect([this](const Gtk::TreeModel::iterator& iter, const Gtk::TreeModel::Path& path){
update_mutex.lock();
last_write_times.erase(iter->get_value(column_record.path).string());
auto directory_str=iter->get_value(column_record.path).string();
for(auto it=last_write_times.begin();it!=last_write_times.end();) {
if(directory_str==it->first.substr(0, directory_str.size()))
it=last_write_times.erase(it);
else
it++;
}
update_mutex.unlock();
auto children=iter->children();
if(children) {

1
src/source.cc

@ -257,6 +257,7 @@ Source::View::View(const boost::filesystem::path &file_path, const boost::filesy
set_tooltip_and_dialog_events();
set_tab_width(4); //Visual size of a \t hardcoded to be equal to visual size of 4 spaces
tab_char=Config::get().source.default_tab_char;
tab_size=Config::get().source.default_tab_size;
if(Config::get().source.auto_tab_char_and_size) {

2
src/source_clang.cc

@ -619,6 +619,7 @@ bool Source::ClangViewParse::on_key_press_event(GdkEventKey* key) {
start_iter.backward_chars(tab_size);
if(boost::regex_match(previous_line, sm, no_bracket_statement_regex) ||
boost::regex_match(previous_line, sm, no_bracket_no_para_statement_regex)) {
if((tabs.size()-tab_size)==sm[1].str().size()) {
get_buffer()->erase(start_iter, iter);
get_buffer()->insert_at_cursor("{");
scroll_to(get_buffer()->get_insert());
@ -628,6 +629,7 @@ bool Source::ClangViewParse::on_key_press_event(GdkEventKey* key) {
}
}
}
}
get_source_buffer()->end_user_action();
return Source::View::on_key_press_event(key);

Loading…
Cancel
Save