TermMessage sends a message to the user in the terminal. This usually occurs before micro has been fully initialized -- ie if there is an error in the syntax highlighting regular expressions The function must be called when the Screen is not initialized This will write the message, and wait for the
(msg ...any)
| 15 | // This will write the message, and wait for the user |
| 16 | // to press and key to continue |
| 17 | func TermMessage(msg ...any) { |
| 18 | screenb := TempFini() |
| 19 | |
| 20 | fmt.Println(msg...) |
| 21 | fmt.Print("\nPress enter to continue") |
| 22 | |
| 23 | reader := bufio.NewReader(os.Stdin) |
| 24 | reader.ReadString('\n') |
| 25 | |
| 26 | TempStart(screenb) |
| 27 | } |
| 28 | |
| 29 | // TermPrompt prints a prompt and requests the user for a response |
| 30 | // The result is matched against a list of options and the index of |