Claus Pedersen
Member³
This bug in the editor has been bothering me for over a decade now and I was finally able to reproduce it.
The situation is, that after having edited e.g. a package for a while, the syntax highlight suddenly gets a wrong offset (one or more characters to the right). The only way to get rid of it, is to close the editor and re-open the source code.
How to reproduce:
I have the following program code (e.g. in a package body):
If I place the cursor on the variable myVariable (either in the declaration or in the code) or in the IF..END IF structure, the green syntax highlight works as planned.
Now I have some text from e.g. an Excel sheet that is divided into two lines. I wrote two lines of text in Notepad and copied it into a cell in Excel to get the line feed. I do not know how to make an Enter (line feed) in Excel without just shifting cell.
Now I copy the Excel cell with text (two lines) and paste it into my comment in the code.
Now the syntax hightlight in e.g. myVariable has shifted to start at the letter y and extend one space to the right of the the variable name.
Also the syntax highlight in the IF..END IF structure now looks strange with wrong offset and the green marking extending an entire line.
If the text from Excel is pasted again the offset shifts yet another character to the right.
This could of course also happen when copying text from Unix-style files (text lines separated by just line feed).
I am using version 11.0.6.1796 (64 bit).
This would be a highly appreciated and long-awaited bug fix (hopefully in version 12).
The situation is, that after having edited e.g. a package for a while, the syntax highlight suddenly gets a wrong offset (one or more characters to the right). The only way to get rid of it, is to close the editor and re-open the source code.
How to reproduce:
I have the following program code (e.g. in a package body):
Code:
PROCEDURE tester IS
myVariable NUMBER;
BEGIN
/*
insert copy-paste text with line feed here (e.g. from Excel)
*/
IF 1=1 THEN
myVariable := 1;
END IF;
END;
If I place the cursor on the variable myVariable (either in the declaration or in the code) or in the IF..END IF structure, the green syntax highlight works as planned.
Now I have some text from e.g. an Excel sheet that is divided into two lines. I wrote two lines of text in Notepad and copied it into a cell in Excel to get the line feed. I do not know how to make an Enter (line feed) in Excel without just shifting cell.
Now I copy the Excel cell with text (two lines) and paste it into my comment in the code.
Now the syntax hightlight in e.g. myVariable has shifted to start at the letter y and extend one space to the right of the the variable name.
Also the syntax highlight in the IF..END IF structure now looks strange with wrong offset and the green marking extending an entire line.
If the text from Excel is pasted again the offset shifts yet another character to the right.
This could of course also happen when copying text from Unix-style files (text lines separated by just line feed).
I am using version 11.0.6.1796 (64 bit).
This would be a highly appreciated and long-awaited bug fix (hopefully in version 12).