Fixes conflict specifically with vim-qf's QuickFix functions. QuickFix, in general, should be skipped with this function
Issue could effect other Plugins in similar situations, but this commit only solves QuickFix.
Error detected while processing FileType Autocommands for "*"..function <SNR>7_LoadFTPlugin
Note: {x}_LoadFTPluginx changes based on whatever pid vim{v}\ftplugin.vim is in :scriptnames
Offending command in ftplugin.vim is: legacy exe b:undo_ftplugin
With tinkering, using :make, the error message [below] also shows up
Error detected while processig QuickFixCmdPost Autocommands for "make"..function qf#OpenQuickfix[17]..fileFileType Autocommands for "*"..function <SNR>6_LoadFTPlugin:
Line: 3:
E184: No such user-defined command: Filter
Theory:
# :help undo_ftplugin
When the user does ":setfiletype xyz" the effect of the previous filetype
should be undone.
When setting the filetype of QuickFix to qfagain, it undoes all vim-qf's functions which causes vim-qf to crash.
Seeing most Plugins are designed to define functions one time, Django-Plus should avoid inadvertently removing them; especially with QuickFix which is a special case
This illustrates why the original empty(a:filename) isn't catching the QuickFix.
Other Observations
expand('%:p') might be a more consistent way of fetching if the buffer is a real file instead of passing with djangoplus#detect#filetype(expand('<afile>:p'))
But I'm not sure if expand('<afile>:p') exists to be backwards compatible
Fixes conflict specifically with vim-qf's QuickFix functions. QuickFix, in general, should be skipped with this function Issue could effect other Plugins in similar situations, but this commit only solves QuickFix.
Specs:
How to recreate
:copen
+:cclose
+:copen
+:cclose
Result:
{x}_LoadFTPlugin
x changes based on whatever pidvim{v}\ftplugin.vim
is in:scriptnames
legacy exe b:undo_ftplugin
With tinkering, using
:make
, the error message [below] also shows upTheory:
When setting the filetype of QuickFix to
qf
again, it undoes all vim-qf's functions which causes vim-qf to crash. Seeing most Plugins are designed to define functions one time, Django-Plus should avoid inadvertently removing them; especially with QuickFix which is a special caseNotes of behavior
1) Opening
views.py
2) Opening
QuickFix
3) Creating
views_test.py
4) Opening
views.py
againPoint:
This illustrates why the original
empty(a:filename)
isn't catching the QuickFix.Other Observations
expand('%:p')
might be a more consistent way of fetching if the buffer is a real file instead of passing withdjangoplus#detect#filetype(expand('<afile>:p'))
But I'm not sure if
expand('<afile>:p')
exists to be backwards compatible