Browse Source

Improved spellcheck inside ''

pipelines/353213535
eidheim 4 years ago
parent
commit
9e534f053d
  1. 10
      src/source_spellcheck.cpp

10
src/source_spellcheck.cpp

@ -491,8 +491,16 @@ bool Source::SpellCheckView::is_word_iter(const Gtk::TextIter &iter) {
return false; return false;
if(Glib::Unicode::isalpha(*iter)) if(Glib::Unicode::isalpha(*iter))
return true; return true;
if(*iter == '\'') if(*iter == '\'') {
if(string_tag && iter.has_tag(string_tag)) {
auto start = iter;
if(!start.begins_tag(string_tag))
start.backward_to_tag_toggle(string_tag);
if(*start == '\'')
return false;
}
return !is_code_iter(iter); return !is_code_iter(iter);
}
return false; return false;
} }

Loading…
Cancel
Save