mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci,term: add a term.set_tab_title/1 shim for windows too (for now just calling term.set_terminal_title/1)
This commit is contained in:
@ -83,10 +83,16 @@ pub fn get_cursor_position() !Coord {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
// set_terminal_title change the terminal title
|
// set_terminal_title changes the terminal title
|
||||||
pub fn set_terminal_title(title string) bool {
|
pub fn set_terminal_title(title string) bool {
|
||||||
title_change := C.SetConsoleTitle(title.to_wide())
|
wide_title := title.to_wide()
|
||||||
return title_change
|
return C.SetConsoleTitle(wide_title)
|
||||||
|
}
|
||||||
|
|
||||||
|
// set_tab_title changes the terminal *tab title*, for terminal emulators that do support several tabs
|
||||||
|
pub fn set_tab_title(title string) bool {
|
||||||
|
// TODO: investigate, whether there is an API for changing just the tab title on windows yet.
|
||||||
|
return set_terminal_title(title)
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear clears current terminal screen.
|
// clear clears current terminal screen.
|
||||||
|
Reference in New Issue
Block a user