mirror of
https://github.com/EnumeratedDev/Typer.git
synced 2025-07-01 23:58:22 +00:00
Compare commits
2 Commits
ff087b196a
...
1b5ce6b7f8
Author | SHA1 | Date | |
---|---|---|---|
1b5ce6b7f8 | |||
8d9de7b732 |
@ -134,7 +134,7 @@ func (buffer *Buffer) Save() error {
|
||||
}
|
||||
|
||||
// Append new line character at end of buffer contents if not present
|
||||
if buffer.Contents[len(buffer.Contents)-1] != '\n' {
|
||||
if buffer.Contents == "" || buffer.Contents[len(buffer.Contents)-1] != '\n' {
|
||||
buffer.Contents += "\n"
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ func RequestInput(window *Window, text string, defaultInput string) chan string
|
||||
request := &TyperInputRequest{
|
||||
Text: text,
|
||||
input: defaultInput,
|
||||
cursorPos: 0,
|
||||
cursorPos: len(defaultInput),
|
||||
inputChannel: make(chan string),
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user