works in progress
This commit is contained in:
parent
40ef42a246
commit
b0db6717ca
22
it/i.py
Normal file
22
it/i.py
Normal file
@ -0,0 +1,22 @@
|
||||
def main(buffer, command):
|
||||
if len(command) > 1:
|
||||
print("?")
|
||||
return buffer
|
||||
|
||||
i = ""
|
||||
while len(i) < 1 or i[-1] != ".\n":
|
||||
try:
|
||||
i += input() + "\n"
|
||||
# unintuitive behavior from ed
|
||||
except KeyboardInterrupt:
|
||||
print("?")
|
||||
return buffer
|
||||
except EOFError:
|
||||
break
|
||||
|
||||
if buffer.dot < buffer.index:
|
||||
buffer.content = i
|
||||
else:
|
||||
buffer.content =
|
||||
buffer.dot += i.count("\n")
|
||||
return buffer
|
Loading…
Reference in New Issue
Block a user