Skip to content

Commit

Permalink
small improvement for last commited patch
Browse files Browse the repository at this point in the history
  • Loading branch information
wadealer committed Mar 10, 2012
1 parent 9fa2f97 commit a16a551
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions patches/1890-psi-dont-spellcheck-digits.diff
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@
setFormat(index, length, tcf);
index = text.indexOf(expression, index + length);
}
--- psi.orig/src/msgmle.cpp
+++ psi/src/msgmle.cpp
@@ -348,7 +348,7 @@ void ChatEdit::contextMenuEvent(QContext
tc.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);
tc.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
QString selected_word = tc.selectedText();
- if (!selected_word.isEmpty() && !SpellChecker::instance()->isCorrect(selected_word)) {
+ if (!selected_word.isEmpty() && !QRegExp("\\d+").exactMatch(selected_word) && !SpellChecker::instance()->isCorrect(selected_word)) {
QList<QString> suggestions = SpellChecker::instance()->suggestions(selected_word);
if (!suggestions.isEmpty() || SpellChecker::instance()->writable()) {
QMenu spell_menu;

0 comments on commit a16a551

Please sign in to comment.