Closed comintern closed 7 years ago
With Align Dims turned on:
Before:
Private Sub Test()
Dim foo As String, bar As String _
, baz As String _
, somethingElse As String
Dim x As Integer
End Sub
After:
Private Sub Test()
Dim foo As String, bar As String _
, baz As String _
, somethingElse As String
Dim x As Integer
End Sub
Is that also a bug in the original SmartIndenter?
More or less. I'm actually surprised it didn't crash the SmartIndenter. It outputs this for the first case:
Public Sub Test()
Dim foo As Boolean, bar As String _
, baz As String _
, somethingElse As String
Dim x As Integer
If Not foo Then
x = 1
End If
End Sub
And this in the second case:
Public Sub Test()
Dim foo As Boolean, bar As String _
, baz As String _
, somethingElse As String
Dim x As Integer
If Not foo Then
x = 1
End If
End Sub
It's a bug in the function aligner - I'll probably just add Dim
block tracking and bypass it with a special case.
This code (avert your eyes if you're faint of heart...)...
...indents to...