Community
Participate
Working Groups
Build Identifier: I20100608-0911 Using the latest PDT-build from hudson (#368, N201007260312), the PHP-editor automatically inserts trailing spaces (or tabs, depending on the chosen indentation-policy) after pressing the Enter-key (== at the end of the line). Additionally, there are some other strange and hard-to-describe effects which result in quite broken formatting, see examples below. Not sure, but the problems might have been introduced in build #367 which contains changes for bug 245815 and bug 201979 (which both deal with indentation). Reproducible: Always Steps to Reproduce: 1. Settings: "PHP" -> "Code Style" -> "Formatter": policy "Spaces", size "4". "General" -> "Editors" -> "Text Editors": Make sure "Insert spaces for tabs" and "Show whitespace characters" are checked. 2. Open the PHP-file I'll attach to this bug, which has the following content: <?php class Foo{ public function bar() { $baz = array( 'somekey' => 'somevalue', 'anotherkey' => 'anothervalue', ); } } 3.1. Adding more code to the method: Place the cursor (for example) on line 8 after the semicolon and press Enter. Observe the (unwanted) spaces after the semicolon. 3.2. Changing indentation: Place the cursor infront of one of the "=>"-operators and press Tab. Expected result: 4 additional spaces. Actual result: 8 additional spaces. 3.3. Adding another method: Place the cursor after the closing brace of foo() and press enter (observe the unnecessary spaces here as well). Type "public function someFunc()" followed by "Enter"; result looks ok (apart from the spaces). Now type the opening brace of the method. Observe how the "{"-char jumps up one line.
Created attachment 175240 [details] Example PHP-file
(In reply to comment #0) > 3.3. Adding another method: Place the cursor after the closing brace of foo() That should read "after the closing brace of bar()" of course.
fixed in head,thanks for your reporting!
Verified fixed. Kalin Yanev kalin.a@zend.com