orca r4561 - in trunk: . src/orca



Author: wwalker
Date: Mon Feb 16 12:59:56 2009
New Revision: 4561
URL: http://svn.gnome.org/viewvc/orca?rev=4561&view=rev

Log:
Additional fix for bug #569343 - Speaking of indentation is misleading


Modified:
   trunk/ChangeLog
   trunk/src/orca/default.py

Modified: trunk/src/orca/default.py
==============================================================================
--- trunk/src/orca/default.py	(original)
+++ trunk/src/orca/default.py	Mon Feb 16 12:59:56 2009
@@ -2211,7 +2211,7 @@
         utterance = ""
         offset = 0
         while True:
-            while line[offset] == ' ':
+            while (offset < len(line)) and line[offset] == ' ':
                 spaceCount += 1
                 offset += 1
             if spaceCount:
@@ -2222,10 +2222,9 @@
                                       "%d spaces",
                                       spaceCount) % spaceCount + " "
 
-            while line[offset] == '\t':
+            while (offset < len(line)) and line[offset] == '\t':
                 tabCount += 1
                 offset += 1
-
             if tabCount:
                 # Translators: this is the number of tab characters on a line
                 # of text.
@@ -2233,6 +2232,7 @@
                 utterance += ngettext("%d tab",
                                       "%d tabs",
                                       tabCount) % tabCount + " "
+
             if not (spaceCount  or tabCount):
                 break
             spaceCount  = tabCount = 0



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