Mercurial > vim
changeset 22065:d8b95a9cdaaa v8.2.1582
patch 8.2.1582: the channel log does not show typed text
Commit: https://github.com/vim/vim/commit/7ca86fe8dc584141d6a73408acf3e90d8c88c7b9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 3 19:25:11 2020 +0200
patch 8.2.1582: the channel log does not show typed text
Problem: The channel log does not show typed text.
Solution: Add raw typed text to the log file.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 03 Sep 2020 19:30:03 +0200 |
parents | cfabacbdd14f |
children | 5f015f7d330c |
files | src/os_win32.c src/ui.c src/version.c |
diffstat | 3 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os_win32.c +++ b/src/os_win32.c @@ -2065,6 +2065,13 @@ theend: buf[len++] = typeahead[0]; mch_memmove(typeahead, typeahead + 1, --typeaheadlen); } +# ifdef FEAT_JOB_CHANNEL + if (len > 0) + { + buf[len] = NUL; + ch_log(NULL, "raw key input: \"%s\"", buf); + } +# endif return len; #else // FEAT_GUI_MSWIN
--- a/src/ui.c +++ b/src/ui.c @@ -949,6 +949,13 @@ fill_input_buf(int exit_on_error UNUSED) # else len = read(read_cmd_fd, (char *)inbuf + inbufcount, readlen); # endif +# ifdef FEAT_JOB_CHANNEL + if (len > 0) + { + inbuf[inbufcount + len] = NUL; + ch_log(NULL, "raw key input: \"%s\"", inbuf + inbufcount); + } +# endif if (len > 0 || got_int) break;