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
15991599 history_paths[id] = args.history_path
16001600 read_history()
16011601 history_pos = #history + 1
1602+
1603+ if line ~= '' then
1604+ complete()
1605+ end
16021606 end
16031607
16041608 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