Nothing Special   »   [go: up one dir, main page]

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

Fix catch "Pattern not found"/"Unknown function" when locale is not en #7

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

KarolBedkowski
Copy link
@KarolBedkowski KarolBedkowski commented Jul 15, 2019

Why this PR?

The plugin does not work when vim locale is not en; i.e. for python files it raises an error on <C-D>:

Wykryto błąd podczas przetwarzania function doge#generate[3]..doge#generate#pattern:
wiersz   33:
E117: Nieznana funkcja: doge#preprocessors#python#tokens
Wykryto błąd podczas przetwarzania function doge#generate:
wiersz    3:
E171: Brak :endif 

When calling not-existing functions, vim generates localized errors messages that do not match
catch statements in the plugin.

This patch replaces the current catching method for E117 and E486 by one method from :h catch: catch /^Vim\%((\a\+)\)\=:<error number>/

Vim use localized error messages, so current method - catch whole error
message - not work when locale is not C/en.

This patch replace current user method for E117 and E486 by catch
/^Vim\%((\a\+)\)\=:<error number>/
@kkoomen
Copy link
Owner
kkoomen commented Jul 15, 2019

Hi!

Thank for the useful PR! Looks good and I should've used this instead yes, but it slipped my mind (._.)

@kkoomen kkoomen merged commit b42c908 into kkoomen:master Jul 15, 2019
@kkoomen
Copy link
Owner
kkoomen commented Jul 15, 2019

v1.3.1 has been released within the master branch with your new fix in it. Thank you for your support!

@kkoomen kkoomen added the bug Something isn't working label Jul 15, 2019
@kkoomen kkoomen self-assigned this Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants