hook in vterm output callback for terminal feature reporting

This commit is contained in:
cy384 2020-08-31 19:25:46 -04:00
parent 849b9eb573
commit 352f06ae40
3 changed files with 10 additions and 1 deletions

View File

@ -259,6 +259,11 @@ int settermprop(VTermProp prop, VTermValue *val, void *user)
return 0;
}
void output_callback(const char *s, size_t len, void *user)
{
ssh_write((char*)s, len);
}
const VTermScreenCallbacks vtscrcb =
{
.damage = damage,
@ -328,5 +333,7 @@ void console_setup(void)
con.vts = vterm_obtain_screen(con.vterm);
vterm_screen_reset(con.vts, 1);
vterm_screen_set_callbacks(con.vts, &vtscrcb, NULL);
vterm_output_set_callback(con.vterm, output_callback, NULL);
}

View File

@ -192,7 +192,7 @@ void display_about_box(void)
DisposeWindow(about);
}
void ssh_write(char* buf, int len)
void ssh_write(char* buf, size_t len)
{
if (read_thread_state == OPEN && read_thread_command != EXIT)
{

View File

@ -65,3 +65,5 @@ struct ssheven_ssh_connection
};
extern struct ssheven_ssh_connection ssh_con;
void ssh_write(char* buf, size_t len);