diff --git a/ide/charactermapdlg.pas b/ide/charactermapdlg.pas index 9de81df023..c16bf3887f 100644 --- a/ide/charactermapdlg.pas +++ b/ide/charactermapdlg.pas @@ -178,6 +178,7 @@ begin sg := Sender as TStringGrid; if (Button = mbLeft) and (sg.MouseToGridZone(X, Y) = gzNormal) then begin + Col:=0; Row:=0; sg.MouseToCell(X, Y, Col, Row); if (sg.Cells[Col, Row] <> '') and (Assigned(OnInsertCharacter)) then OnInsertCharacter(sg.Cells[Col, Row]); @@ -192,6 +193,7 @@ var begin if StringGrid1.MouseToGridZone(X, Y) = gzNormal then begin + Col:=0; Row:=0; StringGrid1.MouseToCell(X, Y, Col, Row); if StringGrid1.Cells[Col, Row] <> '' then begin @@ -216,6 +218,7 @@ var Row, Col, i: Integer; begin if StringGrid2.MouseToGridZone(X, Y) = gzNormal then begin + Col:=0; Row:=0; StringGrid2.MouseToCell(X, Y, Col, Row); S:=UnicodeBlocks[cbUniRange.ItemIndex].S+(Col)+(Row*16); tmp:=UnicodeToUTF8(S); diff --git a/ide/encloseselectiondlg.pas b/ide/encloseselectiondlg.pas index f452ce647f..289fd7bef7 100644 --- a/ide/encloseselectiondlg.pas +++ b/ide/encloseselectiondlg.pas @@ -70,7 +70,6 @@ procedure GetEncloseSelectionParams(TheType: TEncloseSelectionType; out Template: string); procedure EncloseTextSelection(const Template: string; Source: TStrings; SelectionStart, SelectionEnd: TPoint; - Indent: integer; out NewSelection: string; out NewCursor: TPoint); implementation @@ -161,8 +160,8 @@ begin end; procedure EncloseTextSelection(const Template: string; Source: TStrings; - SelectionStart, SelectionEnd: TPoint; Indent: integer; out - NewSelection: string; out NewCursor: TPoint); + SelectionStart, SelectionEnd: TPoint; out NewSelection: string; out + NewCursor: TPoint); var TemplateLen: Integer; TemplatePos: Integer; diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index 1a05ff2246..ef59fd00e6 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -4773,7 +4773,6 @@ begin GetEncloseSelectionParams(EncloseType,EncloseTemplate); EncloseTextSelection(EncloseTemplate,FEditor.Lines, FEditor.BlockBegin,FEditor.BlockEnd, - FEditor.BlockIndent, NewSelection,NewCaretXY); //debugln(['TSourceEditor.EncloseSelection A NewCaretXY=',NewCaretXY.X,',',NewCaretXY.Y,' "',NewSelection,'"']); FEditor.SelText:=NewSelection;