Bug report #8392

Python Console - Autoclosing brackets behavior

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

Status:Closed
Priority:High
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

Description

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

iface.mapCanvas(

will be expanded automatically to

iface.mapCanvas()

with the cursor placed between the brackets.

Therefore I often find myself typing

iface.mapCanvas())

or

iface.mapCanvas().refresh)

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 11 years ago

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

History

#1 Updated by Nathan Woodrow over 11 years ago

You can turn auto insert off in the console settings.

#2 Updated by Matthias Kuhn over 11 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 11 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF