Skip to content

add option to force contextual lookup #67

Open
keatonmartin wants to merge 1 commit intoAjatt-Tools:masterfrom
keatonmartin:master
Open

add option to force contextual lookup #67
keatonmartin wants to merge 1 commit intoAjatt-Tools:masterfrom
keatonmartin:master

Conversation

@keatonmartin
Copy link

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

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@nairyosangha
Copy link
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

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