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

feat: update backing value for default config #469

Open
wants to merge 1 commit into
base: harpoon2
Choose a base branch
from

Conversation

maxrzaw
Copy link

@maxrzaw maxrzaw commented Jan 2, 2024

This will help with files position not being saved when you harpoon a file that is relative path from the cwd and is not a path from root and then leave the file without marking it again.

  • fix unit test swap file issue
  • add test for relative files
  • add test for context not being saved

@maxrzaw
Copy link
Author

maxrzaw commented Jan 2, 2024

This addresses one of the issues mentioned in the comments of #441. Does not address the issue of lists not being saved on quit.

@maxrzaw maxrzaw force-pushed the position-not-saving branch 2 times, most recently from 956a442 to 6d41f71 Compare January 6, 2024 02:05
@ThePrimeagen
Copy link
Owner

I'm going to try to look closer at this. I may merge this though. I worry it's going to cause issues. I don't like the two levels of translation.

@maxrzaw
Copy link
Author

maxrzaw commented Jan 6, 2024

Hold off on that. I might have found a bug in the create_list_item function.

@maxrzaw
Copy link
Author

maxrzaw commented Jan 6, 2024

Ok, turns out this bug already exists in the harpoon2 branch #476. This change makes it slightly different, but it still happens.

Basically the case is where I have an item in the list and I create a duplicate.
The issue I am having on this branch is that when save the UI with two items that are the same value after they are normalized, i.e ("./README.md" and "README.md"), they are both saved, which results in a duplicate in the list. On this branch they are then displayed the same the next time around which results in similar issues to #476. The problem on this branch is that two values may not be displayed the same when they are first input, but they could be the same file.

I did find another bug with the path normalization and I'll push a fix and some tests for that. Getting more familiar with Plenary.Path.

I'm going to think about how we could solve this issue, but at the moment, I am not sure how without making a large refactor.

This will help with files position not being saved when you harpoon a
file that is a relative path from the cwd and is not a path from root
and then leave the file without opening the ui.

fix unit test swap file issue

add test for relative files

add test for context not being saved

use Plenary.Path:absolute() and add more tests

rename config to _

update unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants