drwl/annotaterb

Include the length of comments in max_schema_info_width only when the with_column_comments option is true.

Closed this issue · 0 comments

When the with_column_comments option is false, there is still the length of comments included in max_schema_info_width, which makes it hard to read due to the space between the column and the data type even when there are no actual comments.
If we only include the length of comments in max_schema_info_width when both the with_comment and with_column_comments options are true, I believe it would become more readable.
Thank you.

def with_comments?
@with_comments ||= raw_columns.first.respond_to?(:comment) &&
raw_columns.map(&:comment).any? { |comment| !comment.nil? }
end

Version

  • annotaterb version: 4.10.2