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 255526

Summary: Code completion deletes lines when in rectangular selection
Product: editor Reporter: alied <alied>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description alied 2015-09-23 21:12:50 UTC
Product Version = NetBeans IDE Dev (Build 201509230002)
Operating System = Linux version 4.2.0cxevoii running on amd64
Java; VM; Vendor = 1.8.0_60
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Reproducibility: Happens every time

STEPS:
  * let's start with this sample code:
        assertThat(object.getId(), is(id));
        assertThat(object.getLoginUsernameC(), is("username"));
        assertThat(object.getLoginPasswordC(), is("password"));
  * move the caret after "assert" in the first line
  * Invoke "Rectangular Selection" (Shift + Ctrl + R)
  * Select "That" in the three lines.
  * Invoke code completion
  * Select "assertArrayEquals" from the code completion options

ACTUAL:
  resultant code is:
        assertArrayEquals(object.getLoginPasswordC(), is("password"));
EXPECTED:
        assertArrayEquals(object.getId(), is(id));
        assertArrayEquals(object.getLoginUsernameC(), is("username"));
        assertArrayEquals(object.getLoginPasswordC(), is("password"));

P.S. This is the simplest example I could come with. Of course this is not actual production code and makes no sense at all; it's just sample code
Comment 1 alied 2015-09-23 21:12:55 UTC
Created attachment 156393 [details]
IDE log
Comment 2 Jiri Prox 2015-09-24 10:04:37 UTC
reproducible