thecocce / pyscripter

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

Auto-brackets doesn't recognize closing bracket #294

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Normally auto-bracketing "matches" closing brackets when they are typed
(skipping over the bracket that is already there).

I've noticed that if any text has been typed since the open bracket an
extra close bracket is inserted rather than detecting that the closing
bracket is already present (ie. to the right of the cursor)

If no text is type between the open and closed bracket the program operates
as expected.

Using Python 2.6.1 and pyscripter 1.9.9.6

Original issue reported on code.google.com by cag...@gmail.com on 21 Apr 2009 at 10:57

GoogleCodeExporter commented 9 years ago
The same occurs to ",

if you type " in the editor a nother " is inserted, if you are not aware and 
type ", the auto-inserted " is replaced but if you type "test" in the editor, 
the result is "test""

Original comment by mproel...@googlemail.com on 2 Sep 2010 at 6:13

GoogleCodeExporter commented 9 years ago
Fixed for brackets ) ] }.
I won't do it for strings, since it is not straightforward to tell whether a 
closing " or ' is unmatched.

Original comment by pyscripter on 17 Sep 2010 at 3:01

GoogleCodeExporter commented 9 years ago

Original comment by pyscripter on 30 Sep 2010 at 3:08