Closed ashamis closed 9 years ago
The issue is caused by the fact that when user switches tabs in INSERT mode InsertLeave
event doesn't happen. That means that variables g:filestyle_current_line
and g:filestyle_current_line_match
were not undefined, so when in another tab InsertLeave
handler is called, there is no ID of a match stored in g:filestyle_current_line_match
and this causes an error.
Unfortunately, proposed solution only hides the issue and doesn't solve it. Real solution should define variables filestyle_current_line
and filestyle_current_line_match
in scope of a buffer.
Fix introduced by a commit f3407ee71cc1e4564caa96668cffcc7372fb639d.
At this point the new tab will be displayed along with an error at the bottom. This error does not effect the user experience and should therefore not be displayed.