Editor: ecToggleComment command should always comment at line start, not at BlockBegin
Original Reporter info from Mantis: etrusco
-
Reporter name: Flávio Etrusco
Original Reporter info from Mantis: etrusco
- Reporter name: Flávio Etrusco
Description:
Currently ecComment and ecToggleComment starts a comment (add '//') at BlockBegin if there's selection in a single line (BlockBegin.Y = BlockEnd.Y).
I don't think this is useful, IMO the point of ecComment is to comment the whole line. It's not uncommon that I'll comment a line and right before select some text in it and copy to clipboard.
FWIW this is the code.
ide\sourceeditor.pp, line 3340:
smNormal:
begin
if OldBlockStart.Y = OldBlockEnd.Y then
Result := OldBlockStart.X
else
Result := MinCommonIndent;
end;
Mantis conversion info:
- Mantis ID: 20091
- Version: 0.9.31 (SVN)
- Fixed in version: 0.9.31 (SVN)
- Fixed in revision: 33647 (#ae14a2fb)
- Target version: 0.99.0