Browse Source

Now does not use clang indentation while inside comment or string context.

merge-requests/365/head
eidheim 10 years ago
parent
commit
69ca4e1e81
  1. 7
      src/source.cc

7
src/source.cc

@ -1479,10 +1479,9 @@ bool Source::ClangViewParse::on_key_press_event(GdkEventKey* key) {
return true; return true;
} }
if(key->keyval==GDK_KEY_Return) auto iter=get_buffer()->get_insert()->get_iter();
last_keyval_is_return=true; if(iter.backward_char() && (get_source_buffer()->iter_has_context_class(iter, "comment") || get_source_buffer()->iter_has_context_class(iter, "string")))
else return Source::View::on_key_press_event(key);
last_keyval_is_return=false;
if(get_buffer()->get_has_selection()) { if(get_buffer()->get_has_selection()) {
return Source::View::on_key_press_event(key); return Source::View::on_key_press_event(key);

Loading…
Cancel
Save