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 268248

Summary: "Remove" and "Delete added text" functions remove closing brackets
Product: versioncontrol Reporter: t_gergely
Component: HistoryAssignee: Ondrej Vrabec <ovrabec>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description t_gergely 2016-09-28 12:49:54 UTC
Save a source file with a method containing an inner block (eg. for loop):

public class NewClass {
  public static void main(String[] args) {
    {
      
    }
  }
}

Now, add a comment in the line of the closing bracket.

public class NewClass {
  public static void main(String[] args) {
    {
      
    } // Whatever
  }
}

Using the the History/Remove function will incorrectly remove the whole line, including the closing bracket.

public class NewClass {
  public static void main(String[] args) {
    {
      
  }
}