good morning!!!!

Skip to content
Snippets Groups Projects
Commit c472b8f7 authored by Bas van Kervel's avatar Bas van Kervel
Browse files

main clear current line on ctrl-C

parent 28b14d3e
No related branches found
No related tags found
No related merge requests found
......@@ -383,6 +383,11 @@ func (self *jsre) interactive() {
for {
line, err := self.Prompt(<-prompt)
if err != nil {
if err == liner.ErrPromptAborted { // ctrl-C
self.resetPrompt()
inputln <- ""
continue
}
return
}
inputln <- line
......@@ -469,6 +474,12 @@ func (self *jsre) parseInput(code string) {
var indentCount = 0
var str = ""
func (self *jsre) resetPrompt() {
indentCount = 0
str = ""
self.ps1 = "> "
}
func (self *jsre) setIndent() {
open := strings.Count(str, "{")
open += strings.Count(str, "(")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment