8000 Flip operands · python-mode/python-mode@f395f43 · GitHub
[go: up one dir, main page]

Skip to content

Commit f395f43

Browse files
committed
Flip operands
This avoids accessing the b:python_modified value, which under some circumstances cannot be set, which results in the following error: Error detected while processing function pymode#buffer_post_write: line 2: E121: Undefined variable: b:pymode_modified E15: Invalid expression: b:pymode_modified && g:pymode_rope_regenerate_on_write Note that this does not address the core issue with why pymode_modified if unset in the first place, but this avoids that being a problem if g:python_rope_regenerate_on_write is not wanted anyway.
1 parent 294894a commit f395f43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/pymode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ endfunction "}}}
113113

114114
fun! pymode#buffer_post_write() "{{{
115115
if g:pymode_rope
116-
if b:pymode_modified && g:pymode_rope_regenerate_on_write
116+
if g:pymode_rope_regenerate_on_write && b:pymode_modified
117117
call pymode#debug('regenerate')
118118
call pymode#rope#regenerate()
119119
endif

0 commit comments

Comments
 (0)
0