add option to force contextual lookup #67
Open
keatonmartin wants to merge 1 commit intoAjatt-Tools:masterfrom
Open
add option to force contextual lookup #67keatonmartin wants to merge 1 commit intoAjatt-Tools:masterfrom
keatonmartin wants to merge 1 commit intoAjatt-Tools:masterfrom
Conversation
| local list = self.popup_dict.window_list | ||
| if #list == 1 then | ||
| if #list == 1 or conf.trust_first_dict:get_value() then | ||
| self.popup_dict.word = list[1].word -- often useless |
Member
There was a problem hiding this comment.
in what case is this not useless? self.popup_dict here should always be the top level dict window so isn't that always what you want?
Member
|
This makes sense to me, that's a scenario I had not considered and it shouldn't be in anyone's way, just left one comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pr adds an option to make all lookups contextual
When I'm using the addon for a language like french, I'll often first lookup a conjugated verb, which pulls up a dictionary entry just mentioning the tense and the original verb, and I'll then do a second lookup on the original verb in the first lookup's dictionary. If the conjugated verb is a substring of the unconjugated verb, then the original context is preserved, otherwise it is lost.
This may be a niche edge case but was still frustrating enough for me to make my own fork; unsure if these changes will be deemed necessary by the maintainers but otherwise feel free to reject