Fixes #5660. update_prompt('') is now equivalent to update_prompt(nil), which avoids the prompt stacking problem when setting an empty prompt.

git-svn-id: file:///home/svn/framework3/trunk@13855 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Tod Beardsley
2011-10-10 18:42:44 +00:00
parent 568bde7aa4
commit 1f1cd87e87
+1 -1
View File
@@ -237,7 +237,7 @@ module Shell
# mode - append or not to append - false = append true = make a new prompt
def update_prompt(prompt = nil, new_prompt_char = nil, mode = false)
if (self.input)
if prompt
if prompt and prompt.length > 1
new_prompt = self.init_prompt + ' ' + prompt + prompt_char + ' '
else
new_prompt = self.prompt || ''