refactor: name configurable viewport scroll steps accurately

This commit is contained in:
Valdemar Lorenzen
2026-10-16 10:31:36 +02:00
parent 284ddd3713
commit d1048df345
12 changed files with 80 additions and 54 deletions
+4 -4
View File
@@ -145,7 +145,7 @@ module Vamp
@popup = PopupConfig.new
@labels = {}
@scroll_distance = 0
@scroll_half_page_lines = nil
@scroll_step_lines = nil
@highlight_trailing_whitespace = false
@whitespace_characters = {}
@whitespace_scope = "all"
@@ -232,8 +232,8 @@ module Vamp
# @param lines [Integer, nil] positive screen rows, or nil for half the viewport
# @return [Integer, nil]
def scroll_half_page_lines=(lines)
@scroll_half_page_lines = lines.nil? ? nil : diff_line_count!(lines, "scroll_half_page_lines", 1)
def scroll_step_lines=(lines)
@scroll_step_lines = lines.nil? ? nil : diff_line_count!(lines, "scroll_step_lines", 1)
end
# @param enabled [Boolean]
@@ -350,7 +350,7 @@ module Vamp
"git_blame" => @git_blame,
"git_gutter" => @git_gutter,
"scroll_distance" => @scroll_distance,
"scroll_half_page_lines" => @scroll_half_page_lines,
"scroll_step_lines" => @scroll_step_lines,
"highlight_trailing_whitespace" => @highlight_trailing_whitespace,
"whitespace_characters" => @whitespace_characters,
"whitespace_scope" => @whitespace_scope,