From 1e0917c739068079ba7ec4709d6ae817aac3c96b Mon Sep 17 00:00:00 2001 From: chzyer <0@0xdf.com> Date: Thu, 21 Apr 2016 10:06:19 +0800 Subject: [PATCH] fix typo --- example/readline-multiline/readline-multiline.go | 2 +- readline.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/readline-multiline/readline-multiline.go b/example/readline-multiline/readline-multiline.go index cb01d2b..2192cf6 100644 --- a/example/readline-multiline/readline-multiline.go +++ b/example/readline-multiline/readline-multiline.go @@ -28,7 +28,7 @@ func main() { continue } cmds = append(cmds, line) - if !strings.Contains(line, ";") { + if !strings.HasSuffix(line, ";") { rl.SetPrompt(">>> ") continue } diff --git a/readline.go b/readline.go index 6ff97be..4b866fb 100644 --- a/readline.go +++ b/readline.go @@ -152,7 +152,7 @@ func (i *Instance) SetMaskRune(r rune) { i.Operation.SetMaskRune(r) } -// change hisotry persistence in runtime +// change history persistence in runtime func (i *Instance) SetHistoryPath(p string) { i.Operation.SetHistoryPath(p) }