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:
parent
71e8fc8b38
commit
b19db3a207
@ -83,10 +83,16 @@ pub fn get_cursor_position() !Coord {
|
||||
return res
|
||||
}
|
||||
|
||||
// set_terminal_title change the terminal title
|
||||
// set_terminal_title changes the terminal title
|
||||
pub fn set_terminal_title(title string) bool {
|
||||
title_change := C.SetConsoleTitle(title.to_wide())
|
||||
return title_change
|
||||
wide_title := title.to_wide()
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user