1920Re: [jasspa] increase / decrease indent
- Aug 31, 2006Thomas Hundt wrote:
> Ha! What a funny bug!Thanks for this, it certainly was broken and this did fix the problem.
> You select a region from the bottom up, do Format>Decrease Indent, and
> the last line (only) gets moved.
> The decrease indent function must have a loop whereby it starts from
> mark and does a "while if line < point" at the end of it.
> which calls indent-increase
> I think this swap-the-ends-of-the-region functionality is backwards, in
> format.emf around line 384 (I've commented out the incorrect lines):
> set-variable #l1 $window-line
> !if &les #l2 #l1
> ; set-variable #l2 #l1
> ; set-variable #l1 $window-line
> set-variable #l1 #l2 ; TMH FIX
> set-variable #l2 $window-line ; TMH FIX
> set-variable #l2 &sub #l2 1
> This seems to work, in my 30s of testing.
I did identify a few more subtle usability aspects surrounding this
command with respect to point and mark moving which in some
circumstances caused the selected region size to change. Hopefully I
have fixed these now but has meant that the point and mark cannot be
retained at their original positions in all cases but does mean that the
command should behave as expected.
A new patch is available as follows:
- << Previous post in topic