View Issue Details

IDProjectCategoryView StatusLast Update
0024950LazarusIDEpublic2015-03-13 12:17
ReporterBart Broersma Assigned ToMattias Gaertner  
Status assignedResolutionopen 
Product Version1.1 (SVN) 
Summary0024950: Wrong placement of close statement for Pascal blocks when cursos is at end of includefile.
DescriptionIf 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;

| is Cursor position

Then press Enter:

Expected result:

procedure bar;

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:


If inside procedure bar you continue typing

procedure bar;

and press enter, the finally..end ends up in the main unit:

{$i} finally
Steps To ReproduceOpen attached example.
Go to
At end of file type:

procedure bar;

(| is cursor position)
Press enter.
Additional InformationI attached editoroptions.xml
TagsNo tags attached.
Fixed in Revision
Attached Files


has duplicate 0027661 resolvedMattias Gaertner Autocomplete in Inc file: "end" added into outer file 


Bart Broersma

2013-09-03 13:47

developer (2,105 bytes)

Bart Broersma

2013-09-03 13:48


editoroptions.xml (860 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
  <EditorOptions Version="9">
    <Display DisableAntialiasing="True" DoNotWarnForFont="Courier New">
      <MarkupCurrentWord Time="4000" FullLen="4"/>
        <Version Value="6"/>
    <CodeTools CodeTemplateFileName="C:\Users\Bart\AppData\Local\lazarus\lazarus.dci" CompletionLongLineHintTypeCompletionLongLineHintType="sclpExtendRightOnly"/>
      <Default Version="1"/>
    <Color Version="9">
      <Globals Version="9">
          <ahaHighlightWord Background="clNone" FrameColor="clNone"/>
      <Editor ShowTabCloseButtons="False"/>
editoroptions.xml (860 bytes)   

Issue History

Date Modified Username Field Change
2013-09-03 13:45 Bart Broersma New Issue
2013-09-03 13:45 Bart Broersma Status new => assigned
2013-09-03 13:45 Bart Broersma Assigned To => Mattias Gaertner
2013-09-03 13:46 Bart Broersma Build => r42539
2013-09-03 13:46 Bart Broersma Steps to Reproduce Updated View Revisions
2013-09-03 13:47 Bart Broersma File Added:
2013-09-03 13:48 Bart Broersma File Added: editoroptions.xml
2013-09-03 13:50 Bart Broersma Description Updated View Revisions
2013-09-03 14:32 Bart Broersma Summary Wrong placement of close statement for Pascal blocks whne cursos is at end of includefile. => Wrong placement of close statement for Pascal blocks when cursos is at end of includefile.
2015-03-13 12:08 Juha Manninen Relationship added has duplicate 0027661