Wrong placement of close statement for Pascal blocks when cursos is at end of includefile.
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
If you are at the end of an includefile and write a new procedure/function, and you have the option "Add close statement for Pascal blocks" turned on and you type:
procedure bar;
begin|
| is Cursor position
Then press Enter:
Expected result:
procedure bar;
begin
|
end;
But instead the "end;" is inserted in the main file that has the include directive, directly after the include directive, so it ens up like:
{$i foobar.inc}end;
If inside procedure bar you continue typing
procedure bar;
begin
try|
and press enter, the finally..end ends up in the main unit:
{$i foobar.inc} finally
end;
end;
Steps to reproduce:
Open attached example.
Go to foobar.inc.
At end of file type:
procedure bar;
begin|
(| is cursor position)
Press enter.
Additional information:
I attached editoroptions.xml
Mantis conversion info:
- Mantis ID: 24950
- OS: Window
- OS Build: Win7
- Build: r42539
- Platform: i386
- Version: 1.1 (SVN)
- Monitored by: » Alextp (CudaText man)