You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have electric-pair-mode turned on by default, and I noticed that when I'm using the python function docstring snippets, every time I define a default string value for a parameter the snippet expansion duplicates the entire argument list.
Notice how the extra text ends at the double quote.
The extra text gets inserted the moment I type the opening double quote and electric pair mode automatically adds the closing one. The cursor at the time will be on the opening quote. If I copy/paste a double quote pair in one shot, this doesn't happen.
This behavior continues by adding extra text above the old extra one if I continue adding parameters that have electric pairs like that. For example if I add a 4th parameter:
Notice how it updates the arguments list correctly at the top, but it keeps adding extra text below while not removing the old one.
The same thing happens if I enter any of the other pair symbols (like '(', '[', '{' etc.). For example, if I add a 5th parameter that has a default list value (I know, not best practice in Python but just for illustration purposes):
I have electric-pair-mode turned on by default, and I noticed that when I'm using the python function docstring snippets, every time I define a default string value for a parameter the snippet expansion duplicates the entire argument list.
For example:
Produces the following output:
Notice how the extra text ends at the double quote.
The extra text gets inserted the moment I type the opening double quote and electric pair mode automatically adds the closing one. The cursor at the time will be on the opening quote. If I copy/paste a double quote pair in one shot, this doesn't happen.
This behavior continues by adding extra text above the old extra one if I continue adding parameters that have electric pairs like that. For example if I add a 4th parameter:
Notice how it updates the arguments list correctly at the top, but it keeps adding extra text below while not removing the old one.
The same thing happens if I enter any of the other pair symbols (like '(', '[', '{' etc.). For example, if I add a 5th parameter that has a default list value (I know, not best practice in Python but just for illustration purposes):
Any idea how I can resolve this?
The text was updated successfully, but these errors were encountered: