diff --git a/DOCS/interface-changes/stats-term-clip.txt b/DOCS/interface-changes/stats-term-clip.txt index 8b3cdf47bd..70a0613d58 100644 --- a/DOCS/interface-changes/stats-term-clip.txt +++ b/DOCS/interface-changes/stats-term-clip.txt @@ -1,2 +1,3 @@ remove `stats-term_width_limit` script-opt add `stats-term_clip` script-opt +remove `stats-term_height_limit` script-opt diff --git a/DOCS/man/stats.rst b/DOCS/man/stats.rst index 10933c0f38..1f3fee8ee2 100644 --- a/DOCS/man/stats.rst +++ b/DOCS/man/stats.rst @@ -120,12 +120,6 @@ Configurable Options Whether to clip lines to the terminal width. -``term_height_limit`` - Default: -1 - - Sets the terminal height. - A value of 0 means the height is infinite, -1 means it's automatic. - ``plot_perfdata`` Default: yes diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 31cf3566c1..ba1e91b234 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -36,7 +36,6 @@ local o = { file_tag_max_count = 16, -- only show the first x file tags show_frame_info = false, -- whether to show the current frame info term_clip = true, - term_height_limit = -1, -- overwrites the terminal height debug = false, -- Graph options and style @@ -92,11 +91,6 @@ local o = { } options.read_options(o) -o.term_height_limit = tonumber(o.term_height_limit) or -1 -if o.term_height_limit < 0 then - o.term_height_limit = nil -end - local format = string.format local max = math.max local min = math.min @@ -1110,10 +1104,9 @@ end -- content : table of the content where each entry is one line -- apply_scroll: scroll the content local function finalize_page(header, content, apply_scroll) - local term_size = mp.get_property_native("term-size", {}) - local term_height = o.term_height_limit or term_size.h or 24 + local term_height = mp.get_property_native("term-size/h", 24) local from, to = 1, #content - if apply_scroll and term_height > 0 then + if apply_scroll then -- Up to 40 lines for libass because it can put a big performance toll on -- libass to process many lines which end up outside (below) the screen. -- In the terminal reduce height by 2 for the status line (can be more then one line)