Merge pull request #3459 from chiizujin/editor_echo
Fix editor echo not displaying correctly for lines with whitespace
This commit is contained in:
commit
5c1d21696e
2 changed files with 10 additions and 3 deletions
|
|
@ -414,7 +414,7 @@ class CmdLineInput(CmdEditorBase):
|
||||||
|
|
||||||
self.caller.msg("|b%02i|||n (|g%s|n) %s" % (cline, indent, raw(line)))
|
self.caller.msg("|b%02i|||n (|g%s|n) %s" % (cline, indent, raw(line)))
|
||||||
else:
|
else:
|
||||||
self.caller.msg("|b%02i|||n %s" % (cline, raw(self.args)))
|
self.caller.msg("|b%02i|||n %s" % (cline, raw(line)))
|
||||||
|
|
||||||
|
|
||||||
class CmdEditorGroup(CmdEditorBase):
|
class CmdEditorGroup(CmdEditorBase):
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,13 @@ class TestEvEditor(BaseEvenniaCommandTest):
|
||||||
"First test line\nInserted-New Replaced Second line-End\n test line\n:",
|
"First test line\nInserted-New Replaced Second line-End\n test line\n:",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.call(
|
||||||
|
eveditor.CmdLineInput(),
|
||||||
|
" Whitespace echo test line.",
|
||||||
|
raw_string=" Whitespace echo test line.",
|
||||||
|
msg="05 Whitespace echo test line.",
|
||||||
|
)
|
||||||
|
|
||||||
def test_eveditor_COLON_UU(self):
|
def test_eveditor_COLON_UU(self):
|
||||||
eveditor.EvEditor(self.char1)
|
eveditor.EvEditor(self.char1)
|
||||||
self.call(
|
self.call(
|
||||||
|
|
@ -168,13 +175,13 @@ class TestEvEditor(BaseEvenniaCommandTest):
|
||||||
eveditor.CmdLineInput(),
|
eveditor.CmdLineInput(),
|
||||||
'First test "line".',
|
'First test "line".',
|
||||||
raw_string='First test "line".',
|
raw_string='First test "line".',
|
||||||
msg='01First test "line" .',
|
msg='01First test "line".',
|
||||||
)
|
)
|
||||||
self.call(
|
self.call(
|
||||||
eveditor.CmdLineInput(),
|
eveditor.CmdLineInput(),
|
||||||
"Second 'line'.",
|
"Second 'line'.",
|
||||||
raw_string="Second 'line'.",
|
raw_string="Second 'line'.",
|
||||||
msg="02Second 'line' .",
|
msg="02Second 'line'.",
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.char1.ndb._eveditor.get_buffer(), "First test \"line\".\nSecond 'line'."
|
self.char1.ndb._eveditor.get_buffer(), "First test \"line\".\nSecond 'line'."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue