8000 Checking on write stops working after executing "go to definition" · Issue #511 · python-mode/python-mode · GitHub
[go: up one dir, main page]

Skip to content

Checking on write stops working after executing "go to definition" #511

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

Closed
bgr opened this issue Dec 17, 2014 · 6 comments
Closed

Checking on write stops working after executing "go to definition" #511

bgr opened this issue Dec 17, 2014 · 6 comments
Labels

Comments

@bgr
Copy link
bgr commented Dec 17, 2014

Code checking (lint+pep8+flakes...) stops working for the currently opened file after executing "go to definition" (Ctrl-c g) on something that leads to a different file, and then closing the split that was opened.

This one has been bothering me for a long time, I don't know if this is the only thing that triggers it because until now it always seemed to stop checking on random, I have finally found out how to reproduce it every time.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@relativistic
Copy link

I'm finding that in general creating splits confuses the code checking. I can still run the :PyModeLint command, but automatic checking on file write stops working.

@tomasz-kuzemko
Copy link

I found that this bug is triggered when quitting a window. Applying the following patch seems to fix it:

diff --git a/ftplugin/python/pymode.vim b/ftplugin/python/pymode.vim
index 3a19d28..2b8277a 100644
--- a/ftplugin/python/pymode.vim
+++ b/ftplugin/python/pymode.vim
@@ -73,7 +73,7 @@ if g:pymode_lint
     command! -buffer -nargs=0 PymodeLint :call pymode#lint#check()

     if v:version > 703 || (v:version == 703 && has('patch544'))
-        au! QuitPre <buffer> call pymode#quit()
+"        au! QuitPre <buffer> call pymode#quit()
     else
         au! pymode BufWinLeave * silent! lclose
     endif

but I dunno what side effects this might have because this effectively disables any autocmd removing. I believe the intention was to remove autocmd for the buffer which is being left, but calling au! in pymode#quit() removes autocmds from every buffer (can be fixed by calling au! * <buffer> instead). And I think this should not be done on QuitPre because after reopening the same file autocommands will be missing. Instead, this should be done before file is really closed, however there does not seem to exist such an autocommand event in Vim.

@albreche
Copy link

I've got the same problem, patching the pymode.vim as tomasz-kuzemko sloved it.

Ubuntu 15.04

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 9 2014 17:36:18)

Rustines incluses : 1-488

@mpyatishev
Copy link
Contributor

Created pull request: #623

@stale
Copy link
stale bot commented Feb 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Feb 13, 2018
@stale
Copy link
stale bot commented Mar 6, 2018

Closed due to inactivity.

@stale stale bot closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
0