So I think this is a recent change/breakage, but I’m not totally sure.
It’s best to illustrate this with examples. For all of these I’m using a clean install of build 3148 with no plugins, and I have indentation width set to 2 and to be done with spaces.
Anywho, if I have the ruby code:
class MyClass
def initialize(*args)
#my_method(*args) do |foo|
#other_method(foo)
#end
end
end
… and I run the “Toggle Comment” on the commented lines, I get:
class MyClass
def initialize(*args)
my_method(*args) do |foo|
other_method(foo)
end
end
end
… everything is A-OK.
But if instead, I run “Toggle Comment” on the commented lines and the comments are like:
class MyClass
def initialize(*args)
#my_method(*args) do |foo|
# other_method(foo)
#end
end
end
… I get this:
class MyClass
def initialize(*args)
my_method(*args) do |foo|
other_method(foo)
end
end
end
If it’s not visible, a space is missing from the indentation in the middle commented line. This is obviously not expected behavior. ST3 though should know not to restore any uncommented line such that the text begins at a position that isn’t a multiple of the tab width. (And if it were going to, it should round up.)