+12
-1
lines changedFilter options
+12
-1
lines changed Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
19
19
# include "nvim/os/os_win_console.h"
20
20
#endif
21
21
#include "nvim/event/rstream.h"
22
+
#include "nvim/msgpack_rpc/channel.h"
22
23
23
24
#define KEY_BUFFER_SIZE 0xfff
24
25
@@ -134,7 +135,17 @@ static void tinput_wait_enqueue(void **argv)
134
135
rbuffer_consumed(input->key_buffer, len);
135
136
rbuffer_reset(input->key_buffer);
136
137
} else {
137
-
const size_t consumed = input_enqueue(keys);
138
+
size_t consumed;
139
+
if (ui_client_channel_id) {
140
+
Array args = ARRAY_DICT_INIT;
141
+
Error err = ERROR_INIT;
142
+
ADD(args, STRING_OBJ(copy_string(keys)));
143
+
// TODO(bfredl): could be non-blocking now with paste?
144
+
Object result = rpc_send_call(ui_client_channel_id, "nvim_input", args, &err);
145
+
consumed = result.type == kObjectTypeInteger ? (size_t)result.data.integer : 0;
146
+
} else {
147
+
consumed = input_enqueue(keys);
148
+
}
138
149
if (consumed) {
139
150
rbuffer_consumed(input->key_buffer, consumed);
140
151
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4