mirror of
https://github.com/EnumeratedDev/typer.git
synced 2026-09-26 18:06:11 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b5ce6b7f8 | ||
|
|
8d9de7b732 |
+1
-1
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user