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 endI’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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login