Bug report #8392

Python Console - Autoclosing brackets behavior

Added by Matthias Kuhn over 9 years ago. Updated over 9 years ago.

Assignee:Salvatore Larosa
Category:PyQGIS Console
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17165


The python console automatically inserts the closing bracket when you type
e.g. for


will be expanded automatically to


with the cursor placed between the brackets.

Therefore I often find myself typing




And then have either a python error or an extra click onto delete

I'd propose to
  • either to remove this behavior of auto-inserting brackets
  • overwrite auto-inserted brackets by manually typed ones (unless e.g. mouse- or arrow-interaction occured which would "commit" the auto-inserted bracket)

Any opinions on this?

Associated revisions

Revision 3644402b
Added by Salvatore Larosa over 9 years ago

[pyqgis-console][fix #8392] automatically removes the redundant char when autoclosing brackets option is enabled


#1 Updated by Nathan Woodrow over 9 years ago

You can turn auto insert off in the console settings.

#2 Updated by Matthias Kuhn over 9 years ago

I should have checked before... Thanks Nathan.

Any opinions about the second proposal and about changing the default setting value for this to be off?

#3 Updated by Salvatore Larosa over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF