View Issue Details

IDProjectCategoryView StatusLast Update
0024950LazarusIDEpublic2015-03-13 12:17
ReporterBart Broersma Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Platformi386OSWindow 
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;
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 ReproduceOpen attached example.
Go to foobar.inc.
At end of file type:

procedure bar;
begin|

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

Relationships

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

Activities

Bart Broersma

2013-09-03 13:47

developer  

cttest.zip (2,105 bytes)

Bart Broersma

2013-09-03 13:48

developer  

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