ton-blockchain / intellij-ton

TON Development plugin for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/23382-ton
GNU General Public License v3.0
66 stars 8 forks source link

A bug with comment/uncomment already commented lines #169

Closed unserialize closed 2 months ago

unserialize commented 2 months ago

I often select a piece of code an comment it with a hotkey.

Consider having the following initial code (note, that one line is commented already):

(int) main() {
;;    int a = 0;
    return 0;
}

I select it, press comment, and get an expected result:

;;(int) main() {
;;;;    int a = 0;
;;    return 0;
;;}

Then I want to rollback it. I select, press comment again.

Expected: getting the initial code. Actual:

(int) main() {
;    int a = 0;
    return 0;
}

(three ';' were removed instead of two)

andreypfau commented 2 months ago

Fixed in 2.2.0