Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5317

Autocomplete interferes with multicaret

    XMLWordPrintableJSON

Details

    Description

      Suppose you want to introduce some constants into a class and you can copy that list somewhere and paste it into the class to work on:

      <?php
      class Test
      {
      	FOO = 1
      	BAR = 2
      	BAZ = 3
      //	🡤 place caret to each of the 3 lines directly above here
      }
      

      This is invalid code, but it should be very easy to place a caret in front of each line, type const, jump to the end of the lines and finish it off with a semicolon.

      However if you don't type fast enough and autocomplete suggestions appear, then whether you accept a suggestion or continue typing, the code gets broken.

      Here's what happens if I type 'c', wait for the suggestions and continue with typing 'o':

      	cBAZo = 1
      	coBAZ = 2
      	coBAZ = 3
      

      Here's what happens if I type 'c', and then accept the 'const' suggestion:

      	const BAZ = 1
      	const BAZ = 2
      	const BAZ = 3
      

      A possible workaround is to type space, then move cursor one character to the left and then type 'const'. If instead of typing a whole 'const', a suggestion is accepted, the code gets some extra spaces, although the names remain intact:

      	const  FOO = 1
      	const  BAR = 2
      	const BAZ = 3
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            czukowski Czukowski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: