Skip to content

source: validate cursor before source lookup - #1629

Open
Alistair-Afton wants to merge 1 commit into
DFHack:masterfrom
Alistair-Afton:fix-source-invalid-cursor
Open

Alistair-Afton wants to merge 1 commit into
DFHack:masterfrom
Alistair-Afton:fix-source-invalid-cursor

Conversation

@Alistair-Afton

Copy link
Copy Markdown

Summary

  • validate the keyboard cursor before searching for an existing liquid source
  • report the intended operator error instead of a nil position traceback
  • add regression coverage for both add and delete

Fixes DFHack/dfhack#5582.
Fixes DFHack/dfhack#5617.

Testing

  • test -t source
  • live source delete with no active cursor
  • live source add water with no active cursor
  • live source list

Move the delete lookup after cursor validation so an inactive keyboard cursor produces the intended operator error instead of a nil-position traceback. Add regression coverage for both add and delete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant