Skip to content

Commit 88969fb

Browse files
committed
g:pymode_trim_whitespaces = 0 was ignored.
* Added condition to the trim function itself.
1 parent 9c8468e commit 88969fb

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)