Browse Source

Minor improvement to Source::SpellCheckView::is_code_iter

merge-requests/389/head
eidheim 7 years ago
parent
commit
c17fd4989a
  1. 4
      src/source_spellcheck.cc

4
src/source_spellcheck.cc

@ -341,7 +341,8 @@ bool Source::SpellCheckView::is_code_iter(const Gtk::TextIter &iter) {
return false; return false;
} }
if(spellcheck_all) { if(spellcheck_all) {
if(no_spell_check_tag && (iter.has_tag(no_spell_check_tag) || iter.begins_tag(no_spell_check_tag) || iter.ends_tag(no_spell_check_tag))) if(no_spell_check_tag) {
if(iter.has_tag(no_spell_check_tag) || iter.begins_tag(no_spell_check_tag) || iter.ends_tag(no_spell_check_tag))
return true; return true;
// workaround for gtksourceview bug // workaround for gtksourceview bug
if(iter.ends_line()) { if(iter.ends_line()) {
@ -361,6 +362,7 @@ bool Source::SpellCheckView::is_code_iter(const Gtk::TextIter &iter) {
if(previous_iter.backward_char() && *previous_iter != '\'' && *previous_iter != '\"' && previous_iter.ends_tag(no_spell_check_tag)) if(previous_iter.backward_char() && *previous_iter != '\'' && *previous_iter != '\"' && previous_iter.ends_tag(no_spell_check_tag))
return true; return true;
} }
}
return false; return false;
} }
if(comment_tag) { if(comment_tag) {

Loading…
Cancel
Save