|
|
|
@ -49,7 +49,8 @@ file_path(file_path), project_path(project_path) { |
|
|
|
|
|
|
|
|
|
|
|
get_buffer()->place_cursor(get_buffer()->get_iter_at_offset(0)); |
|
|
|
get_buffer()->place_cursor(get_buffer()->get_iter_at_offset(0)); |
|
|
|
signal_size_allocate().connect([this](Gtk::Allocation& allocation){ |
|
|
|
signal_size_allocate().connect([this](Gtk::Allocation& allocation){ |
|
|
|
scroll_to(get_buffer()->get_insert()); |
|
|
|
if(!user_input_started) |
|
|
|
|
|
|
|
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -71,6 +72,7 @@ string Source::View::get_line_before_insert() { |
|
|
|
|
|
|
|
|
|
|
|
//Basic indentation
|
|
|
|
//Basic indentation
|
|
|
|
bool Source::View::on_key_press_event(GdkEventKey* key) { |
|
|
|
bool Source::View::on_key_press_event(GdkEventKey* key) { |
|
|
|
|
|
|
|
user_input_started=true; |
|
|
|
auto config=Singleton::Config::source(); |
|
|
|
auto config=Singleton::Config::source(); |
|
|
|
const std::regex spaces_regex(std::string("^(")+config->tab_char+"*).*$"); |
|
|
|
const std::regex spaces_regex(std::string("^(")+config->tab_char+"*).*$"); |
|
|
|
//Indent as in next or previous line
|
|
|
|
//Indent as in next or previous line
|
|
|
|
@ -149,6 +151,11 @@ bool Source::View::on_key_press_event(GdkEventKey* key) { |
|
|
|
return Gsv::View::on_key_press_event(key); |
|
|
|
return Gsv::View::on_key_press_event(key); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Source::View::on_button_press_event(GdkEventButton *event) { |
|
|
|
|
|
|
|
user_input_started=true; |
|
|
|
|
|
|
|
return Gsv::View::on_button_press_event(event); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////
|
|
|
|
/////////////////////////
|
|
|
|
//// ClangViewParse ///
|
|
|
|
//// ClangViewParse ///
|
|
|
|
/////////////////////////
|
|
|
|
/////////////////////////
|
|
|
|
|