mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
input: rename input_{start,stop}_stdin()
- "stdin" is misleading because it may read from stdout or stderr - also remove some unused includes
This commit is contained in:
parent
4219b69145
commit
b2c400b3f2
@ -279,7 +279,7 @@ int main(int argc, char **argv)
|
|||||||
// read the "-" file (eg: cat file | nvim -)
|
// read the "-" file (eg: cat file | nvim -)
|
||||||
fd = params.err_isatty ? fileno(stderr) : fileno(stdout);
|
fd = params.err_isatty ? fileno(stderr) : fileno(stdout);
|
||||||
}
|
}
|
||||||
input_start_stdin(fd);
|
input_start(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// open terminals when opening files that start with term://
|
// open terminals when opening files that start with term://
|
||||||
@ -386,8 +386,8 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!params.headless) {
|
if (!params.headless) {
|
||||||
// Stop reading from stdin, the UI layer will take over now
|
// Stop reading from input stream, the UI layer will take over now.
|
||||||
input_stop_stdin();
|
input_stop();
|
||||||
ui_builtin_start();
|
ui_builtin_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ void event_teardown(void)
|
|||||||
// is required because the `process_events_from` above may call `event_push`
|
// is required because the `process_events_from` above may call `event_push`
|
||||||
// which will set the stop_flag to 1(uv_stop)
|
// which will set the stop_flag to 1(uv_stop)
|
||||||
uv_default_loop()->stop_flag = 0;
|
uv_default_loop()->stop_flag = 0;
|
||||||
input_stop_stdin();
|
input_stop();
|
||||||
channel_teardown();
|
channel_teardown();
|
||||||
job_teardown();
|
job_teardown();
|
||||||
server_teardown();
|
server_teardown();
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <uv.h>
|
#include <uv.h>
|
||||||
@ -8,7 +7,6 @@
|
|||||||
#include "nvim/api/private/defs.h"
|
#include "nvim/api/private/defs.h"
|
||||||
#include "nvim/os/input.h"
|
#include "nvim/os/input.h"
|
||||||
#include "nvim/os/event.h"
|
#include "nvim/os/event.h"
|
||||||
#include "nvim/os/os.h"
|
|
||||||
#include "nvim/os/rstream_defs.h"
|
#include "nvim/os/rstream_defs.h"
|
||||||
#include "nvim/os/rstream.h"
|
#include "nvim/os/rstream.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
@ -54,7 +52,7 @@ int input_global_fd(void)
|
|||||||
return global_fd;
|
return global_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
void input_start_stdin(int fd)
|
void input_start(int fd)
|
||||||
{
|
{
|
||||||
if (read_stream) {
|
if (read_stream) {
|
||||||
return;
|
return;
|
||||||
@ -67,7 +65,7 @@ void input_start_stdin(int fd)
|
|||||||
rstream_start(read_stream);
|
rstream_start(read_stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
void input_stop_stdin(void)
|
void input_stop(void)
|
||||||
{
|
{
|
||||||
if (!read_stream) {
|
if (!read_stream) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user