mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-10 04:41:15 -03:00
Instantize and rationalize locking around the input mapping set
Hypothetically a background thread could invoke builtin_bind, etc. Protect the set of input bindings with a lock.
This commit is contained in:
@@ -3009,8 +3009,12 @@ static void test_input() {
|
||||
// the first!
|
||||
wcstring prefix_binding = L"qqqqqqqa";
|
||||
wcstring desired_binding = prefix_binding + L'a';
|
||||
input_mapping_add(prefix_binding.c_str(), L"up-line");
|
||||
input_mapping_add(desired_binding.c_str(), L"down-line");
|
||||
|
||||
{
|
||||
auto input_mapping = input_mappings();
|
||||
input_mapping->add(prefix_binding.c_str(), L"up-line");
|
||||
input_mapping->add(desired_binding.c_str(), L"down-line");
|
||||
}
|
||||
|
||||
// Push the desired binding to the queue.
|
||||
for (size_t idx = 0; idx < desired_binding.size(); idx++) {
|
||||
|
||||
Reference in New Issue
Block a user