fix space to often

This commit is contained in:
chrys 2016-12-22 21:44:48 +01:00
parent d14b457bba
commit 4262f70bd5
2 changed files with 4 additions and 3 deletions

View File

@ -36,8 +36,7 @@ class command():
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
return
x, y, currChar = char_utils.getCurrentChar(self.env['screenData']['newCursor']['x'], self.env['screenData']['newCursor']['y'], self.env['screenData']['newContentText'])
if not currChar.isspace():
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True)
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True)
def setCallback(self, callback):
pass

View File

@ -43,8 +43,10 @@ class punctuationManager():
resultText = str(text)
if punctuationDict and punctuation and punctuation != '':
if ' ' in punctuation:
resultText = resultText.replace(' ',' ' + punctuationDict[' '] + ' ')
for key,item in punctuationDict.items():
if key in punctuation:
if key in punctuation and key not in ' ':
if self.env['runtime']['settingsManager'].getSetting('general', 'respectPunctuationPause') and \
len(key) == 1 and \
key in ",.;:?!-":