IDE block indent/unindent do not work properly
Original Reporter info from Mantis: BosseB
-
Reporter name: Bo Berglund
Original Reporter info from Mantis: BosseB
- Reporter name: Bo Berglund
Description:
Code that is imported from Delphi or downloaded from websites often has the wrong indentation, maybe caused by mixed use of TAB and &LtPos;space> characters.
In any case when looking at this in Lazarus it gets awful, so I wanted to use my old proven Delphi7 ways to fix it:
- Select a block which has ragged left limit (some lines in different positions)
- Use Ctrl-Shift-u repeatedly until the block is at the left edge and all lines now start in column 1.
- Use Ctrl-Shift-i repeatedly to move the block to the wanted position.
This does not work in Lazarus.
Only by activating the Tab to move blocks in editor configuration is it possible to move blocks of text, but only to the right of the original position.
Using Shift-TAB does nothing, except if it is entered immediately after TAB, when it backs off the indentation just done by TAB.
Notice that it seems totally impossible to move any block left of the original position, which totally breaks the procedure outlined above.
It has been suggested that it is caused by not using TAB as indentation, but this is very hard to prove since Lazarus does not show any whitespace difference...
In fact I would like the unindent to actually remove the configured number of columns in front of the text no matter if the text was moved right by a number of space or TAB characters.
Whitespace is whitespace and if I set my preferences to use the space character then Lazarus should change any tab to the correct number of spaces.
Especially while indenting a block of code.
Mantis conversion info:
- Mantis ID: 17603
- Version: 0.9.28.2
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 27906 (#1db72308)
- Target version: 0.9.30
- LazTarget: 1.0