|
|
|
@ -619,6 +619,7 @@ bool Source::ClangViewParse::on_key_press_event(GdkEventKey* key) { |
|
|
|
start_iter.backward_chars(tab_size); |
|
|
|
start_iter.backward_chars(tab_size); |
|
|
|
if(boost::regex_match(previous_line, sm, no_bracket_statement_regex) || |
|
|
|
if(boost::regex_match(previous_line, sm, no_bracket_statement_regex) || |
|
|
|
boost::regex_match(previous_line, sm, no_bracket_no_para_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()->erase(start_iter, iter); |
|
|
|
get_buffer()->insert_at_cursor("{"); |
|
|
|
get_buffer()->insert_at_cursor("{"); |
|
|
|
scroll_to(get_buffer()->get_insert()); |
|
|
|
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(); |
|
|
|
get_source_buffer()->end_user_action(); |
|
|
|
return Source::View::on_key_press_event(key); |
|
|
|
return Source::View::on_key_press_event(key); |
|
|
|
|