Implement File->Save dropdown option

This commit is contained in:
EnumDev committed 2025-06-07 21:57:26 +03:00
1 parent 448ebe27cf
commit 6b3ef29515
2 files changed
+37 -5

No files matched your search

+4 -2
View File
@@ -13,10 +13,10 @@ type TyperInputRequest struct {
var currentInputRequest *TyperInputRequest
func RequestInput(window *Window, text string) chan string {
func RequestInput(window *Window, text string, defaultInput string) chan string {
request := &TyperInputRequest{
Text: text,
input: "",
input: defaultInput,
cursorPos: 0,
inputChannel: make(chan string),
}
@@ -25,6 +25,8 @@ func RequestInput(window *Window, text string) chan string {
window.CursorMode = CursorModeInputBar
_ = window.screen.PostEvent(tcell.NewEventInterrupt(nil))
return request.inputChannel
}