console.lua: deduplicate code between get-input and handle_cursor_move
This commit is contained in:
1 parent
f439c7f62c
commit
ee9a219600
1 file changed
+1
-7
@@ -1726,13 +1726,7 @@ mp.register_script_message("get-input", function (args)
|
||||
read_history()
|
||||
history_pos = #history + 1
|
||||
|
||||
if line ~= "" then
|
||||
complete()
|
||||
elseif open then
|
||||
-- This is needed to update the prompt if a new request is
|
||||
-- received while another is still active.
|
||||
render()
|
||||
end
|
||||
handle_cursor_move()
|
||||
end
|
||||
|
||||
set_active(true)
|
||||
|
||||
Reference in new issue
Block a user