refactor: name diff orientations vertical and horizontal

This commit is contained in:
2026-10-13 00:05:10 +02:00
parent d1855dbdb7
commit fafec2a6b0
8 changed files with 27 additions and 19 deletions
+4 -4
View File
@@ -142,7 +142,7 @@ module Vamp
@diff_context_lines = 10
@diff_expand_lines = 15
@diff_view_mode = "split"
@diff_split_orientation = "left_right"
@diff_split_orientation = "vertical"
end
# @param path [String] relative to the configuration file
@@ -215,12 +215,12 @@ module Vamp
@diff_view_mode = mode
end
# @param orientation [String] "left_right" or "above_below"
# @param orientation [String] "vertical" or "horizontal"
# @return [String]
def diff_split_orientation=(orientation)
orientation = nonempty_string!(orientation, "diff split orientation")
unless %w[left_right above_below].include?(orientation)
raise ArgumentError, "diff split orientation must be left_right or above_below"
unless %w[vertical horizontal].include?(orientation)
raise ArgumentError, "diff split orientation must be vertical or horizontal"
end
@diff_split_orientation = orientation
end