Skip to content

Commit a9dbc13

Browse files
committed
Merge pull request python-mode#574 from ypid/fixed-disable-trim_whitespaces
g:pymode_trim_whitespaces = 0 was ignored.
2 parents 3e2b48d + 88969fb commit a9dbc13

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

autoload/pymode.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ endfunction "}}}
7676

7777
" DESC: Remove unused whitespaces
7878
fun! pymode#trim_whitespaces() "{{{
79-
let cursor_pos = getpos('.')
80-
silent! %s/\s\+$//
81-
call setpos('.', cursor_pos)
79+
if g:pymode_trim_whitespaces
80+
let cursor_pos = getpos('.')
81+
silent! %s/\s\+$//
82+
call setpos('.', cursor_pos)
83+
endif
8284
endfunction "}}}
8385

8486

0 commit comments

Comments
 (0)