SQL Code Folding
-
Does anyone else notice the SQL code folding seem to have major issues. Using the following code:
if @dbdump=1 begin select @ret=status from master..sysdatabases where dbid=@dbid if @ret is null begin select @errno=50391, @textnach=@dbname goto error end -- select into/bulkcopy if @ret & 4 = 4 begin exec master..sp__changedbopt @dbname, 'select into', false end end
I’d suspect having three fold markers, one for the surrounding if…begin…end and two for the inner begin…end. I will receive those folding markers, but the outer one ends at the end in line 8.
In the following screenshot only the selected text is folded when clicking on the marker in line 2, but it should actually span until line 14:
Why is that?
Possibly relevant topic: https://community.notepad-plus-plus.org/topic/15073/folding-behavior-of-sql-code
-
Notepad++ does not have built-in support for Microsoft Transact-SQL: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12610#issuecomment-1340297100
That may change in a future release, but I would not hold my breath.