mirror of https://github.com/cy384/ssheven.git
hook in vterm output callback for terminal feature reporting
This commit is contained in:
parent
849b9eb573
commit
352f06ae40
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue