kbrose / vsc-python-indent

Correctly indent python code on the fly, in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=KevinRose.vsc-python-indent
MIT License
82 stars 19 forks source link

Correctly delete selected text starting w/ space #97

Closed kbrose closed 2 years ago

kbrose commented 2 years ago

Fixes #96

If text was selected that also triggered the check for the following:

    // If cursor has whitespace to the right, followed by non-whitespace,
    // and also has non-whitespace to the left, then trim the whitespace to the right
    // of the cursor. E.g. in cases like "def f(x,| y):"

then an invalid edit would be constructed and thus rejected, so no edits would be made.