Community
Participate
Working Groups
Typing code in editor seems broken after you have used php template with variable ${line_selection} or ${word_selection} Scenario: Go to Preferences>PHP>Editor>Templates > Press New button. In Add template dialog press Insert Variable button . Add ${line_selection} in Pattern list. Type testlineselection in Name field. Save the new added template. Open a php file in editor. Type some valid code, e.g. <?php class CCC { function fff() { echo "test"; } } Select the whole class and it body (lines 2 to 6), then invoke Content Assist and type part of template name, e.g. "test" You will see the suggested template in CA list. Select it in CA list. Problem 1: First 4 chars of the template will be placed in editor, since you typed 4 chars ("test") of template name ("testlineselection") Problem 2 If you try to continue typing you will see the cursor goes unexpectedly at the beginning of line 2, then it goes to line 1 just before opening php tag <?php The cursor cannot be moved from this position by typing anymore. Just in a few seconds the error becomes as much as 1 MB size.
Similar problem when you use ${word_selection} template.
Created attachment 205493 [details] screenshot-step1
Created attachment 205495 [details] screenshot-step2
Created attachment 205496 [details] screenshot-step3
Created attachment 205497 [details] screenshot-step4
Saving the file does not solve the problem. The only workaround: Close the file and open it again.
fixed
I re-tested the problem. Now if you select the template in Content Assist list you will get nothing added in editor and the cursor just goes to the first position on the line. Of course you have to select the whole class and its body in advance (as described in the issue.) See the new attachment. This happens for ${line_selection} The same problem for ${word_selection} Reopening...
Created attachment 218376 [details] New_step1
Created attachment 218377 [details] New_step2(reslult)