Some further fixes with the refactored line editor.
This commit is contained in:
parent
870c750538
commit
d2a69910a9
1 changed files with 6 additions and 6 deletions
|
|
@ -408,23 +408,23 @@ class CmdEditorGroup(CmdEditorBase):
|
||||||
elif cmd == ":y":
|
elif cmd == ":y":
|
||||||
# :y <l> - yank line(s) to copy buffer
|
# :y <l> - yank line(s) to copy buffer
|
||||||
cbuf = linebuffer[lstart:lend]
|
cbuf = linebuffer[lstart:lend]
|
||||||
editor.copy_buffer = cbuf
|
editor._copy_buffer = cbuf
|
||||||
string = "%s, %s yanked." % (self.lstr.capitalize(), cbuf)
|
string = "%s, %s yanked." % (self.lstr.capitalize(), cbuf)
|
||||||
elif cmd == ":x":
|
elif cmd == ":x":
|
||||||
# :x <l> - cut line to copy buffer
|
# :x <l> - cut line to copy buffer
|
||||||
cbuf = linebuffer[lstart:lend]
|
cbuf = linebuffer[lstart:lend]
|
||||||
editor.copy_buffer = cbuf
|
editor._copy_buffer = cbuf
|
||||||
buf = linebuffer[:lstart] + linebuffer[lend:]
|
buf = linebuffer[:lstart] + linebuffer[lend:]
|
||||||
editor.update_buffer(buf)
|
editor.update_buffer(buf)
|
||||||
string = "%s, %s cut." % (self.lstr.capitalize(), cbuf)
|
string = "%s, %s cut." % (self.lstr.capitalize(), cbuf)
|
||||||
elif cmd == ":p":
|
elif cmd == ":p":
|
||||||
# :p <l> paste line(s) from copy buffer
|
# :p <l> paste line(s) from copy buffer
|
||||||
if not editor.copy_buffer:
|
if not editor._copy_buffer:
|
||||||
string = "Copy buffer is empty."
|
string = "Copy buffer is empty."
|
||||||
else:
|
else:
|
||||||
buf = linebuffer[:lstart] + editor.copy_buffer + linebuffer[lstart:]
|
buf = linebuffer[:lstart] + editor._copy_buffer + linebuffer[lstart:]
|
||||||
editor.update_buffer(buf)
|
editor.update_buffer(buf)
|
||||||
string = "Copied buffer %s to %s." % (editor.copy_buffer, self.lstr)
|
string = "Copied buffer %s to %s." % (editor._copy_buffer, self.lstr)
|
||||||
elif cmd == ":i":
|
elif cmd == ":i":
|
||||||
# :i <l> <txt> - insert new line
|
# :i <l> <txt> - insert new line
|
||||||
new_lines = self.args.split('\n')
|
new_lines = self.args.split('\n')
|
||||||
|
|
@ -520,7 +520,7 @@ class CmdEditorGroup(CmdEditorBase):
|
||||||
elif cmd == ":echo":
|
elif cmd == ":echo":
|
||||||
# set echoing on/off
|
# set echoing on/off
|
||||||
editor._echo_mode = not editor._echo_mode
|
editor._echo_mode = not editor._echo_mode
|
||||||
string = "Echo mode set to %s" % editor.echo_mode
|
string = "Echo mode set to %s" % editor._echo_mode
|
||||||
caller.msg(string)
|
caller.msg(string)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue