Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winConsoleHandler.calculateNewText fails when comparing lines with different lengths #729

Closed
nvaccessAuto opened this issue Jun 24, 2010 · 4 comments
Assignees
Labels
Milestone

Comments

@nvaccessAuto
Copy link

Reported by aleksey_s on 2010-06-24 13:52

from winConsoleHandler import calculateNewText

calculateNewText(["b"*23)

Traceback (most recent call last):
File "", line 1, in
File "D:\nvda\main\source\winConsoleHandler.py", line 186, in calculateNewText
if text[pos]!=diffLines[lineNum-1][2:][pos]:
IndexError: string index out of range

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2010-06-25 00:20
Simpler way to reproduce:

calculateNewText([["a"]("aa"],))

While i agree this needs to be fixed if we want to use this code anywhere else, it isn't a problem for consoles because lines always have the same length (padded with spaces). Therefore, it isn't a bug that should show up in normal use of NVDA. Unless there's a use case I'm missing...?
Changes:
Milestone changed from 2010.2 to None

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2010-11-09 03:14
As part of the displayModelNewText branch, I'm refactoring this code so we can use it in multiple places. I've fixed this bug in the new code.
Changes:
Milestone changed from None to 2011.1

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2010-11-09 23:06
Consoles now use the new code in the displayModelNewText branch.

@nvaccessAuto
Copy link
Author

Comment 4 by jteh on 2010-11-10 18:33
Fixed with the new !LiveText behavior in 6b0fdbe.
Changes:
Changed title from "winConsoleHandler.calculateNewText fails in special cirnstumstance" to "winConsoleHandler.calculateNewText fails when comparing lines with different lengths"
State: closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants