History

console.lua: factor OSC margins before the bottom margin

OSC margins are relative to the whole height before subtracting the bottom left margin.

Guido Cella committed 2 years ago

Commit e1680161 parent 41cff491 file · +3 −2Browse files

Showing the changes to player/lua/console.lua (1 of 1 file). Show all

Unified · Split

player/lua/console.lua+3−2
@@ -276,8 +276,9 @@ local function calculate_max_log_lines() · 275 unmodified lines
276276 select(2, mp.get_property('term-status-msg'):gsub('\\n', ''))
277277 end
278278
279− return math.floor((select(2, get_scaled_osd_dimensions()) - bottom_left_margin)
280− * (1 - global_margins.t - global_margins.b)
279+ return math.floor((select(2, get_scaled_osd_dimensions())
280+ * (1 - global_margins.t - global_margins.b)
281+ - bottom_left_margin)
281282 / opts.font_size
282283 -- Subtract 1 for the input line and 0.5 for the empty
283284 -- line between the log and the input line.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t