We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e99884a commit a008828Copy full SHA for a008828
src/nvim/nvim.cpp
@@ -282,6 +282,13 @@ void NvimSendModifiedInput(Nvim *nvim, const char *input, bool virtual_key) {
282
}
283
284
void NvimSendChar(Nvim *nvim, wchar_t input_char) {
285
+ // If the space is simply a regular space,
286
+ // simply send the modified input
287
+ if(input_char == VK_SPACE) {
288
+ NvimSendModifiedInput(nvim, "Space", true);
289
+ return;
290
+ }
291
+
292
char utf8_encoded[64]{};
293
if(!WideCharToMultiByte(CP_UTF8, 0, &input_char, 1, 0, 0, NULL, NULL)) {
294
return;
@@ -301,7 +308,7 @@ void NvimSendChar(Nvim *nvim, wchar_t input_char) {
301
308
302
309
void NvimSendSysChar(Nvim *nvim, wchar_t input_char) {
303
310
304
- if(WideCharToMultiByte(CP_UTF8, 0, &input_char, 1, 0, 0, NULL, NULL) == 0) {
311
+ if(!WideCharToMultiByte(CP_UTF8, 0, &input_char, 1, 0, 0, NULL, NULL)) {
305
312
306
313
307
314
WideCharToMultiByte(CP_UTF8, 0, &input_char, 1, utf8_encoded, 64, NULL, NULL);
0 commit comments