mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 06:54:58 +02:00
Add window titles to various ask kitten invocations
This commit is contained in:
@@ -362,12 +362,15 @@ func GetChoices(o *Options) (response string, err error) {
|
||||
if hidden_text != "" && message != "" {
|
||||
message = message[:hidden_text_start_pos] + hidden_text + message[hidden_text_end_pos:]
|
||||
hidden_text = ""
|
||||
draw_screen()
|
||||
_ = draw_screen()
|
||||
}
|
||||
}
|
||||
|
||||
lp.OnInitialize = func() (string, error) {
|
||||
lp.SetCursorVisible(false)
|
||||
if o.Title != "" {
|
||||
lp.SetWindowTitle(o.Title)
|
||||
}
|
||||
return "", draw_screen()
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ The name for this question. Used to store history of previous answers which can
|
||||
be used for completions and via the browse history readline bindings.
|
||||
|
||||
|
||||
--title --window-title
|
||||
The title for the window in which the question is displayed. Only implemented
|
||||
for yesno and choices types.
|
||||
|
||||
|
||||
--choice -c
|
||||
type=list
|
||||
dest=choices
|
||||
|
||||
@@ -129,6 +129,7 @@ func Run(args []string) (rc int, err error) {
|
||||
}
|
||||
|
||||
lp.OnInitialize = func() (string, error) {
|
||||
lp.SetWindowTitle("kitty mouse features demo")
|
||||
lp.SetCursorVisible(false)
|
||||
draw_screen()
|
||||
return "", nil
|
||||
|
||||
Reference in New Issue
Block a user