diff options
author | ZyX <kp-pav@yandex.ru> | 2017-03-19 16:55:37 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-19 16:56:00 +0300 |
commit | bd798a3267a496c644b339c45189b09e2a952014 (patch) | |
tree | af4dd543f54bd166b5b288484551df26995179d7 /src/nvim/getchar.h | |
parent | fdfa1ed578afd41a68f05c88dc419d88051b7240 (diff) | |
download | rneovim-bd798a3267a496c644b339c45189b09e2a952014.tar.gz rneovim-bd798a3267a496c644b339c45189b09e2a952014.tar.bz2 rneovim-bd798a3267a496c644b339c45189b09e2a952014.zip |
getchar: Use fileio instead of fdopen
Problem: as fileio is cached and reads blocks this is going to wait
until either EOF or reading enough characters to fill rbuffer. This is
not good when reading user input from stdin as script.
Diffstat (limited to 'src/nvim/getchar.h')
-rw-r--r-- | src/nvim/getchar.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/getchar.h b/src/nvim/getchar.h index bdf65909b6..04517866ec 100644 --- a/src/nvim/getchar.h +++ b/src/nvim/getchar.h @@ -1,6 +1,8 @@ #ifndef NVIM_GETCHAR_H #define NVIM_GETCHAR_H +#include "nvim/os/fileio.h" + /* Values for "noremap" argument of ins_typebuf(). Also used for * map->m_noremap and menu->noremap[]. */ #define REMAP_YES 0 /* allow remapping */ @@ -12,6 +14,12 @@ #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */ #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */ +/// Maximum number of streams to read script from +enum { NSCRIPT = 15 }; + +/// Streams to read script from +extern FileDescriptor *scriptin[NSCRIPT]; + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "getchar.h.generated.h" #endif |