Skip to content

Commit 315eb06

Browse files
console.lua: remove undocumented dont_bind_up_down option
This undocumented option was used by `stats.lua` to prevent the page scroll keys from being overridden by `console.lua`. The previous commits have removed the need for this hack, so it is now safe to remove.
1 parent 71775cd commit 315eb06

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

player/lua/console.lua

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ local MAX_LOG_LINES = 10000
9393
local log_buffers = {}
9494
local log_offset = 0
9595
local key_bindings = {}
96-
local dont_bind_up_down = false
9796
local global_margins = { t = 0, b = 0 }
9897
local input_caller
9998
local input_caller_handler
@@ -1573,12 +1572,10 @@ local function define_key_bindings()
15731572
return
15741573
end
15751574
for _, bind in ipairs(get_bindings()) do
1576-
if not (dont_bind_up_down and (bind[1] == "up" or bind[1] == "down")) then
1577-
-- Generate arbitrary name for removing the bindings later.
1578-
local name = "_console_" .. (#key_bindings + 1)
1579-
key_bindings[#key_bindings + 1] = name
1580-
mp.add_forced_key_binding(bind[1], name, bind[2], {repeatable = true})
1581-
end
1575+
-- Generate arbitrary name for removing the bindings later.
1576+
local name = "_console_" .. (#key_bindings + 1)
1577+
key_bindings[#key_bindings + 1] = name
1578+
mp.add_forced_key_binding(bind[1], name, bind[2], {repeatable = true})
15821579
end
15831580
mp.add_forced_key_binding("any_unicode", "_console_text", text_input,
15841581
{repeatable = true, complex = true})
@@ -1683,7 +1680,6 @@ mp.register_script_message("get-input", function (args)
16831680
keep_open = args.keep_open
16841681
default_item = args.default_item
16851682
has_completions = args.has_completions
1686-
dont_bind_up_down = args.dont_bind_up_down
16871683
searching_history = false
16881684

16891685
if args.items then

0 commit comments

Comments
 (0)