Page 1 of 1

[IDE Bug] Indentation faulty - after pressing 'Enter'.

Posted: Tue Aug 15, 2017 11:03 pm
by PureLust
Info: I have defined indentation-keywords for ";>" (+2 after) and ";<" (-2 after)

If you write a new Line with an indentation Marker (";>") and press 'Enter', the cursor jumps to the correct position (+2 tabs).
But if you type something and press 'Enter', the line will be indented wrong (indentation jumps back to beginning of the previous line, but only after the 2nd indentation).

If you reformat the Code with 'Ctrl-I', it indents the text right, but if you hit enter after an indentation-marker, it messes up the code again as described above (cursor position is right first, but if you press 'enter', the indentation is wrong again).

Type in the following code:

Code: Select all

;>
a
;>
b
;>
c
;<
d
;<
e
;<
f
it will be formatted like this (as you can see - 1st indentation is correct, 2nd, 3rd, ... indentation is wrong) :

Code: Select all

;>
   a
   ;>
   b
   ;>
   c
   ;<
   d
   ;<
   e
   ;<
   f
after reformat (Ctrl+I) it will be formatted correct:

Code: Select all

;>
	a
	;>
		b
		;>
			c
			;<
		d
		;<
	e
	;<
f
But as soon as you edit this correct indented text, the indentation will get messed up again.

Can anyone confirm this?

Re: Indentation after pressing 'Enter' is wrong.

Posted: Wed Aug 16, 2017 10:27 am
by Bisonte
Very strange... but confirmed.

Re: Indentation after pressing 'Enter' is wrong.

Posted: Thu Aug 17, 2017 12:28 pm
by PureLust
Maybe another hint for debugging this:

Indentation after 'Enter' works fine, as long as there are only remarks.
As soon as there is a line with anything else but a remark (like a PB Command), indentation get wrong.

Code: Select all

;> - 1st indentation is fine
		
		;> - 2nd indentation is fine too
				
				;> - 3rd indentation is fine as well
						
						Debug ""
						
						;> - as soon as there is a non-remark entry before, indentation get wrong
						
						;> - wrong
						
						;< - wrong
						
						;< - wrong
						
						;< - wrong
						
						;< - wrong
						
						;< - wrong
And again - Ctrl+I formats it right, but if you edit the code, indentation get messed up after pressing 'Enter' again.