History

console.lua: instantly show completions with the type script message

With script-message-to commands type, instantly show completions if available. Useful e.g. with loadfile or apply-profile. This also shows completions if you just close the console with a filled line and reopen it.

Guido Cella committed 1 year ago

Commit d738e781 parent 415078b1 file · +4 −0Browse files

Unified · Split

player/lua/console.lua+4−0
@@ -1599,6 +1599,10 @@ mp.register_script_message('get-input', function (script_name, args) · 1598 unmodified lines
1599 history_paths[id] = args.history_path1599 history_paths[id] = args.history_path
1600 read_history()1600 read_history()
1601 history_pos = #history + 11601 history_pos = #history + 1
1602
1603 if line ~= '' then
1604 complete()
1605 end
1602 end1606 end
1603 1607
1604 set_active(true)1608 set_active(true)

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