vtst / ow

Various Eclipse plugins for web development
http://www.normalesup.org/~simonet/soft/
74 stars 29 forks source link

Auto-indent features are slightly broken in 1.0.20. #217

Closed coredumperror closed 10 years ago

coredumperror commented 10 years ago

The auto-indent mechanism is indenting one indent-width less than it used to. Using "," to represent a space, I expect to see:

.class {
,,
}

when I type .class{<ENTER>. Instead, I now see:

.class {

}

This happens at multiple levels of initial indent. When I expect to get:

.class {
,,.subclass {
,,,,
,,}
}

Instead I get:

.class {
,,.subclass {
,,
,,}
}

I imagine that this is probably a side-effect of the disableable auto-edit features you added in this release (which I really appreciate!), unless there's some additional setting I need to enable to make this work as expected. I have the "Indentation" option checked in the new Auto-Edit configuration pane, so I'm not sure what else I can do.

In addition, the "Compound Brace Blocks" auto-edit option appears to be broken in a similar way. When I take this code:

.class {
  .sub1 {
    .sub2 {width: 100%;}
  }
}

and place the cursor just before the "w" in "width", then press ENTER, I expect to get this:

.class {
  .sub1 {
    .sub2 {
      width: 100%;
    }
  }
}

Instead, I get this:

.class {
  .sub1 {
    .sub2 {
  width: 100%;
}
  }
}

I hope you can fix these problems soon. Thanks!

vtst commented 10 years ago

Fixed in the code base. Thanks for the bug report!