[tomboy] fixed bug #675783 - spellcheck should ignore acronyms



commit 773c74bdd953c3808be0a9ab55c2acbab1f384c9
Author: Alemann Massho <armistice_con fastmail fm>
Date:   Sat May 12 01:04:08 2012 -0400

    fixed bug #675783 - spellcheck should ignore acronyms
    
    The spell checker now avoids words in all caps.
    
    Signed-off-by: Jared Jennings <jjennings src gnome org>

 Tomboy/Watchers.cs |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/Tomboy/Watchers.cs b/Tomboy/Watchers.cs
index 2be096d..8a28a9c 100644
--- a/Tomboy/Watchers.cs
+++ b/Tomboy/Watchers.cs
@@ -339,6 +339,20 @@ namespace Tomboy
 						break;
 					}
 				}
+				// Remove misspelled tag for acronyms (in all caps)
+				if (!args.StartChar.EndsWord() && System.Char.IsUpper(args.StartChar.Char, 0)) {
+					Gtk.TextIter char_iter = args.StartChar;
+					remove = true;
+					while (!char_iter.EndsWord()) {
+						if (Char.IsLower(char_iter.Char, 0)) {
+							remove = false;
+							break;
+						}
+						else {
+							char_iter.ForwardChar();
+						}
+					}
+				}
 			} else if (!NoteTagTable.TagIsSpellCheckable (args.Tag)) {
 				remove = true;
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]