Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 302 forks source link

Wrong autocomplete for curly braces #3464

Open trogne opened 6 years ago

trogne commented 6 years ago

Short Summary

Wrong autocomplete for curly braces.

Steps to Reproduce

Enter an open curly brace inside the parentheses :

    foo({){
    }

Expected results

    foo({}){
    }  

Actual results

The auto-added closing curly brace is wrong :

    foo({){
    }  
    }

Platform Information

Komodo IDE Komodo Version : 11.0.2 *Operating System (and version)? Windows 10.

mitchell-as commented 6 years ago

Hi, what language are you using? I am not able to reproduce this in JavaScript:

  1. Start by typing if () {.
  2. Komodo will autocomplete the closing }.
  3. Pressing enter yields
    
    if () {

}


4. Place the cursor between the parentheses and type `{`.
5. I do not observe any complement `}` being inserted, even after pressing enter.
trogne commented 6 years ago

Javascript. Me :

if({){

}
}

Instead of :

if({}){

}

Do you have this check in preferences, smart editing ? : "enable soft characters inside line".

Mine was checked, I unchecked it and I no more have the problem. I guess that's why there's this option. Maybe not a bug...

mitchell-as commented 6 years ago

Thanks for pointing out that preference. If I check that preference, I can reproduce your described issue. I would qualify it as a bug. Thanks!

trogne commented 6 years ago

Yes, after thinking, it IS a bug. I'd prefer to keep the "enable soft characters inside line" active.