diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-10-29 17:30:45 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-10-29 23:08:43 -0300 |
commit | 4fd9ee4a6b908d86815f08c8880db73d9dda13dc (patch) | |
tree | 1a54272d34ce26a87b4f3b7a327d8eaf4e0d5bf9 /src/nvim/os/job.c | |
parent | 49d5ed55914b5af32abcb87b6b422f880dc1d0d0 (diff) | |
download | rneovim-4fd9ee4a6b908d86815f08c8880db73d9dda13dc.tar.gz rneovim-4fd9ee4a6b908d86815f08c8880db73d9dda13dc.tar.bz2 rneovim-4fd9ee4a6b908d86815f08c8880db73d9dda13dc.zip |
input/job: process ctrl+c and do conversion in the read callback
- Extract `process_interrupts` out of `convert_input`
- Instead of waiting for os_breakcheck/os_inchar calls, call `convert_input`
and `process_interrupts` directly from the read callback in input.c.
- Remove the `settmode` calls from `job_wait`. Now that interrupts are
processed in the event loop, there's no need to set the terminal to cooked
which introduces other problems(ref 7.4.427)
Diffstat (limited to 'src/nvim/os/job.c')
-rw-r--r-- | src/nvim/os/job.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/nvim/os/job.c b/src/nvim/os/job.c index 9a11ecd1fd..f8ad6874c9 100644 --- a/src/nvim/os/job.c +++ b/src/nvim/os/job.c @@ -15,7 +15,6 @@ #include "nvim/os/shell.h" #include "nvim/vim.h" #include "nvim/memory.h" -#include "nvim/term.h" #define EXIT_TIMEOUT 25 #define MAX_RUNNING_JOBS 100 @@ -277,10 +276,6 @@ void job_stop(Job *job) /// is possible on some OS. int job_wait(Job *job, int ms) FUNC_ATTR_NONNULL_ALL { - // switch to cooked so `got_int` will be set if the user interrupts - int old_mode = cur_tmode; - settmode(TMODE_COOK); - // Increase refcount to stop the job from being freed before we have a // chance to get the status. job->refcount++; @@ -296,8 +291,6 @@ int job_wait(Job *job, int ms) FUNC_ATTR_NONNULL_ALL event_poll(0); } - settmode(old_mode); - if (!--job->refcount) { int status = (int) job->status; // Manually invoke close_cb to free the job resources |