LionHeart123 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Variable Highlighting - Bad scope #642

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Considering this python code.

def printFunc(test):
    print test

def main():
    test = 3
    other = 4
    printFunc(other)

if __name__ == '__main__':
    main()

When double-clicking on test at the line 1, PyScripter highlight test (line 1), 
test (line 2) and test (line 5).

It should highlight only test on line 1 and 2, because the test at line 5 is 
not the same variable.

Using python 2.7.2.1, PyScripter 2.4.1.0, Windows 7.

Original issue reported on code.google.com by yann.pen...@gmail.com on 18 Apr 2012 at 12:40

GoogleCodeExporter commented 9 years ago
This feature is part of search and replace (there is a highlight button there). 
 It does not do any syntactic analysis.  It just highlights all occurrences of 
the selected word.

Ctrl + Click is based on the code analysis and it takes you to the definition 
of a variable or function name.

Original comment by pyscripter on 18 Apr 2012 at 8:15