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

Post bugs related to the IDE here
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

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

Post 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?
Last edited by PureLust on Thu Aug 17, 2017 12:43 pm, edited 2 times in total.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: Indentation after pressing 'Enter' is wrong.

Post by Bisonte »

Very strange... but confirmed.
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Re: Indentation after pressing 'Enter' is wrong.

Post 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.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Post Reply