[Bug?] Additional indentation caused by PB-KeyWord in Remark

Working on new editor enhancements?
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

[Bug?] Additional indentation caused by PB-KeyWord in Remark

Post by PureLust »

I've defined an indentation KeyWord ";>" and ";<" which does a folding and an indentation of 2 tabs.

If I write a PB-KeyWord (e.g. DataSection) in the remarks following the defined indentation KeyWord, this will cause an additional indentation.
If the PB-KeyWord followes a KeyWord which just folds (e.g. ";{" ), it's fine.

I don't know if this could really called a bug (because this behavior is consistent, after any KeyWord which causes an indentation), but it doesn't seems really useful (or wanted) to me in remarks.

It's useful, that you can place an additional indentation KeyWord like ";>" after a PB-Command which already causes an indentation, but I think the indentation-check should exclude further indentation KeyWords in remarks.

e.g.

Code: Select all

DataSection  ;>   - 2 x indentation / useful
;>  DataSection   - 2 x indentation / not really useful
In the following example you can see how it affects the indentation within a code:

Code: Select all

; 		From the PureBasic.prefs:
; 		
; 		[Folding]
;
; 		Start_1 = ;>
; 		End_2 = ;<

; 		[Indentation]
;
; 		Keyword_3 = ;<
; 		Before_3 = 0
; 		After_3 = -2
;
; 		Keyword_4 = ;>
; 		Before_4 = 0
; 		After_4 = 2




;{ ----- DataSection  (the keyword "DataSection" does not cause an indentation)

; --- <<< no additional indentation because of "DataSection" in Remarks

DataSection
	
	; -----
	
EndDataSection

; ---

;}


; <<< The indentation of this Line is correct



;> ----- DataSection  (now, the keyword "DataSection" causes an indentation)
			
			; --- <<< additional indentation caused by the keyword "DataSection" in Remarks above
			
			DataSection
				
				; -----
				
			EndDataSection
			
			; ---
			
			;<
	
	
	; <<< The indentation of this Line is NOT correct

	
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)