Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes if you run List (l), then insert first line (1i), but if you don't run List first it doesn't crash. #4

Closed
pianoelle opened this issue Jul 2, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@pianoelle
Copy link
Collaborator

Editing /home/pia/test_dedlin/testpart2.txt
 * l
--- Current line is 1, 0 lines total ---
 * 1i
Control C to exit insert mode
Traceback (most recent call last):
  File "/home/pia/test_dedlin/venv/bin/dedlin", line 8, in <module>
    sys.exit(main())
  File "/home/pia/test_dedlin/venv/lib/python3.10/site-packages/dedlin/__main__.py", line 35, in main
    _ = run(
  File "/home/pia/test_dedlin/venv/lib/python3.10/site-packages/dedlin/__main__.py", line 85, in run
    dedlin.entry_point(file_name, macro_file_name)
  File "/home/pia/test_dedlin/venv/lib/python3.10/site-packages/dedlin/main.py", line 155, in entry_point
    self.doc.insert(line_number)
  File "/home/pia/test_dedlin/venv/lib/python3.10/site-packages/dpcontracts.py", line 507, in inner
    raise PreconditionError(description)
dpcontracts.PreconditionError: Current line must be a valid line
(venv) pia@pia-envy:~/test_dedlin$ ^C
(venv) pia@pia-envy:~/test_dedlin$ ^C
(venv) pia@pia-envy:~/test_dedlin$ 

Crashes if you run List (l), then insert first line (1i), but if you don't run List first it doesn't crash.

@pianoelle pianoelle added the bug Something isn't working label Jul 2, 2022
@pianoelle
Copy link
Collaborator Author

Editing /home/pia/test_dedlin/testpart4.txt
 * l
--- Current line is 1, 0 lines total ---
 * 1i
Control C to exit insert mode
?   1 :  test
?   2 :  best
?   3 :  rest
?   4 :                                                                                                                                                                                                     

Exiting insert mode

Bug fixed. Tested again - does not crash if you run List (l) and then insert first line (1i).

@pianoelle pianoelle assigned pianoelle and unassigned pianoelle Jul 30, 2022
@pianoelle pianoelle added this to the Version 1 feature complete milestone Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants