()
| 120 | } |
| 121 | |
| 122 | async submit() { |
| 123 | this.value = this.value || this.initial; |
| 124 | this.cursorOffset = 0; |
| 125 | this.cursor = this.rendered.length; |
| 126 | await this.validate(); |
| 127 | if (this.error) { |
| 128 | this.red = true; |
| 129 | this.fire(); |
| 130 | this.render(); |
| 131 | return; |
| 132 | } |
| 133 | this.done = true; |
| 134 | this.aborted = false; |
| 135 | this.fire(); |
| 136 | this.render(); |
| 137 | this.out.write("\n"); |
| 138 | this.close(); |
| 139 | } |
| 140 | |
| 141 | next() { |
| 142 | if (!this.placeholder) return this.bell(); |