fix: creating scratch when text is selected within a note SHOULD not match scratches just due to prefix #1292
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fix scratch creation when text is selected within a note.
Description
Expected: Just
Create New
is shown.Actual (prior to the fix): some other scratch entries are shown. Hence,
Create New
is all the way at the bottom (can be even outside the view).Related description of issue: [[Fix Scratch Creation|scratch.2021.08.31.091837.improve-lookup.fix-scratch-creation]]
Prior to this change:
After the change
Pull Request Checklist
You can go to dendron pull requests to see full details for items in this checklist.
General
Quality Assurance
Tried to add a test for this use case but for some reason selection does not seem to be picked up as expected in a test
tried to add
In a test after the note is opened and the selection is not picked up by the look up in a test.
https://github.com/dendronhq/dendron/blob/master/packages/plugin-core/src/test/suite-integ/NoteLookupCommand.test.ts#L721
Docs
Example PR Description