Community
Participate
Working Groups
Build ID: M20071023-1652 Steps To Reproduce: 1. Create an if statement with multiple lines 2. Type the opening curly brace 3. hit enter More information: The indentation of the closing curly brace is off by one tab as is the cursor location if the if statement is more than one line. Example of what happens: if (empty($something) && empty($something_else)) { |<-cursor }
Reproducable with PDT 1.1 N20080529 by typing in this: 1: <?php 2: 3: if (empty($something)&& 4: empty($something_else)) 5: 6: ?> then adding the { at the end of line 4. However, if I type in this: 1: <?php 2: 3: if (empty($something)&& 4: empty($something_else)) 5: 6: ?> then adding the { on line 4 adds the closing brace at the margin and the cursor one indent in, as expected. Output is: if (empty($something) && empty($something_else)) { |<-cursor }
Found another bug. Type or paste in this: 1: <?php 2: if (empty($something) && empty($something_else)) 3: ?> then go back to line 2 and at the end of the line hit { and enter. The cursor indents correctly, but there's no closing brace. 1: <?php 2: if (empty($something) && empty($something_else)){ 3: |<-cursor 4: ?> However, if there's a full blank line between the if line and the ?>, the closing brace DOES appear.
Created attachment 103008 [details] mylyn/context/zip
(In reply to comment #2) > Found another bug. Type or paste in this: > > 1: <?php > 2: if (empty($something) && empty($something_else)) > 3: ?> > > then go back to line 2 and at the end of the line hit { and enter. > The cursor indents correctly, but there's no closing brace. > > 1: <?php > 2: if (empty($something) && empty($something_else)){ > 3: |<-cursor > 4: ?> > > However, if there's a full blank line between the if line and the ?>, the closing brace DOES appear. problem (of comment#2) is solved on PDT 2.0 NirC
*** Bug 250718 has been marked as a duplicate of this bug. ***
Still relevant - changing version to 2.0.0 [Sylvia Tancheva]
Reproducible on 2.1-SR1 Moving to 2.2.0
fixed in head
[Petyo Tanchev] Version 2.2.0 from 13 Aug. 2010. The initial issue is still relevant. The other issue in Comment 2 is fixed.
fixed
[Petyo Tanchev] Tested on 2.2.1.v20100829 Still got the same result if (empty($something) && empty($something_else)) { |<-cursor }
Verified. Ilina Stefanova