Is your feature request related to a problem? Please describe.
Enabling include_surrounding_whitespace often leads to technically correct, but somewhat unexpected behavior.
Given this text:
local obj = {
text = "foobar", -- comment
number = 123,
}
For instance, deleting the --comment via @comment.outer results in:
local obj = {
text = "foobar", number = 123,
}
Which is technically correct – surrounding whitespace was included – but very unintuitive behavior.
Describe the solution you'd like
include_surrounding_whitespace should not include line breaks if the text object is characterwise.
Describe alternatives you've considered
Simply disabling include_surrounding_whitespace entirely (which is a waste, since it's in principle a nice feature)
Additional context
There are a few other issues like #575 which seem to be related to this problem.