Browse Source

Corrected smart insertions: no longer inserts for instance () when cursor is at '[' or '{'

pipelines/235045657
eidheim 5 years ago
parent
commit
64b990c4b2
  1. 2
      src/source.cpp

2
src/source.cpp

@ -2988,7 +2988,7 @@ bool Source::View::on_key_press_event_smart_inserts(GdkEventKey *event) {
auto allow_insertion = [](const Gtk::TextIter &iter) { auto allow_insertion = [](const Gtk::TextIter &iter) {
if(iter.ends_line() || *iter == ' ' || *iter == '\t' || *iter == ';' || *iter == ',' || if(iter.ends_line() || *iter == ' ' || *iter == '\t' || *iter == ';' || *iter == ',' ||
*iter == ')' || *iter == '[' || *iter == ']' || *iter == '{' || *iter == '}' || *iter == '<' || *iter == '>' || *iter == '/') *iter == ')' || *iter == ']' || *iter == '}' || *iter == '<' || *iter == '>' || *iter == '/')
return true; return true;
return false; return false;
}; };

Loading…
Cancel
Save