mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
mch_init -> term_init
This commit is contained in:
@@ -60,6 +60,7 @@
|
|||||||
#include "nvim/os/time.h"
|
#include "nvim/os/time.h"
|
||||||
#include "nvim/os/input.h"
|
#include "nvim/os/input.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
|
#include "nvim/os/event.h"
|
||||||
#include "nvim/os/signal.h"
|
#include "nvim/os/signal.h"
|
||||||
#include "nvim/msgpack_rpc/helpers.h"
|
#include "nvim/msgpack_rpc/helpers.h"
|
||||||
#include "nvim/api/private/defs.h"
|
#include "nvim/api/private/defs.h"
|
||||||
@@ -252,14 +253,12 @@ int main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
// term_init() sets up the terminal (window) for use. This must be
|
||||||
* mch_init() sets up the terminal (window) for use. This must be
|
// done after resetting full_screen, otherwise it may move the cursor
|
||||||
* done after resetting full_screen, otherwise it may move the cursor
|
term_init();
|
||||||
* Note that we may use mch_exit() before mch_init()!
|
|
||||||
*/
|
|
||||||
mch_init();
|
|
||||||
TIME_MSG("shell init");
|
TIME_MSG("shell init");
|
||||||
|
|
||||||
|
event_init();
|
||||||
|
|
||||||
if (!embedded_mode) {
|
if (!embedded_mode) {
|
||||||
// Print a warning if stdout is not a terminal.
|
// Print a warning if stdout is not a terminal.
|
||||||
|
@@ -130,26 +130,6 @@ void mch_suspend(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void mch_init(void)
|
|
||||||
{
|
|
||||||
Columns = 80;
|
|
||||||
Rows = 24;
|
|
||||||
|
|
||||||
// Prevent buffering output.
|
|
||||||
// Output gets explicitly buffered and flushed by out_flush() at times like,
|
|
||||||
// for example, when the user presses a key. Without this line, vim will not
|
|
||||||
// render the screen correctly.
|
|
||||||
setbuf(stdout, NULL);
|
|
||||||
|
|
||||||
out_flush();
|
|
||||||
|
|
||||||
#ifdef MACOS_CONVERT
|
|
||||||
mac_conv_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
event_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
static int get_x11_title(int test_only)
|
static int get_x11_title(int test_only)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -1010,6 +1010,30 @@ static struct builtin_term builtin_termcaps[] =
|
|||||||
# define DEFAULT_TERM (char_u *)"dumb"
|
# define DEFAULT_TERM (char_u *)"dumb"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// Sets up the terminal window for use.
|
||||||
|
///
|
||||||
|
/// This must be done after resetting full_screen, otherwise it may move the
|
||||||
|
/// cursor.
|
||||||
|
///
|
||||||
|
/// @remark We may call mch_exit() before calling this.
|
||||||
|
void term_init(void)
|
||||||
|
{
|
||||||
|
Columns = 80;
|
||||||
|
Rows = 24;
|
||||||
|
|
||||||
|
// Prevent buffering output.
|
||||||
|
// Output gets explicitly buffered and flushed by out_flush() at times like,
|
||||||
|
// for example, when the user presses a key. Without this line, vim will not
|
||||||
|
// render the screen correctly.
|
||||||
|
setbuf(stdout, NULL);
|
||||||
|
|
||||||
|
out_flush();
|
||||||
|
|
||||||
|
#ifdef MACOS_CONVERT
|
||||||
|
mac_conv_init();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Term_strings contains currently used terminal output strings.
|
* Term_strings contains currently used terminal output strings.
|
||||||
* It is initialized with the default values by parse_builtin_tcap().
|
* It is initialized with the default values by parse_builtin_tcap().
|
||||||
|
Reference in New Issue
Block a user