This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 167816

Summary: bracket completion: Auto-completion (closing brackets) acts a bit crazy ;)
Product: php Reporter: adamo79pl <adamo79pl>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: blocker CC: tslota
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description adamo79pl 2009-06-29 15:51:14 UTC
let's assume that at the end of a file I have a class:


<?php
...
...
class Bean {
}
?>

Now. If I place the cursor at the beginning of the last line, like this:

(cursor)?>

and then I start typing another class for example:

class Carrot {(CURSOR)?>

and then when I press enter it should give me something like this:

class Carrot {
(CURSOR)
}?>

or like this:

class Carrot {
	(CURSOR)
}?>

or like this:

class Carrot {
	(CURSOR)
}
?>

What NetBeans gives me is actually hilarious:

class Carrot {
	(CURSOR)?>
}

I guess auto-completion / closing-brackets mechanism doesn't mind me writing PHP outside PHP ;)
Comment 1 Tomasz Slota 2009-11-13 07:49:43 UTC
problem reproducible, a corner case.
Comment 2 Filip Zamboj 2009-11-13 10:24:36 UTC
similar was reported against indentation when php mixed with html. a duplicate? #175885 https://netbeans.org/bugzilla/show_bug.cgi?id=175885
Comment 3 Petr Pisl 2009-11-13 11:33:40 UTC
Still reproducible, but too late fix it in NB 6.8.
Comment 4 Petr Pisl 2010-10-07 12:41:59 UTC
Fixed in web-main. I'm sorry that it took so long.
Comment 5 Quality Engineering 2010-10-08 03:24:09 UTC
Integrated into 'main-golden', will be available in build *201010080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9e12d880aeb8
User: Petr Pisl <ppisl@netbeans.org>
Log: #167816 - bracket completion: Auto-completion (closing brackets) acts a bit crazy ;)