Skip to content

Commit a9ff2d9

Browse files
committed
Fallback to normal gq when no better solution is found
1 parent 630fdc7 commit a9ff2d9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

indent/python.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,12 @@ function! GetPythonPEPFormat(lnum, count)
536536
endif
537537

538538

539+
"" Fallback to old behaviour when nothing is found
539540
if l:breakpoint[1] == 0
540541
call winrestview(l:winview)
541-
else
542-
call feedkeys("r\<CR>")
543-
call feedkeys('gqq')
542+
return 1
544543
endif
544+
545+
call feedkeys("r\<CR>")
546+
call feedkeys('gqq')
545547
endfunction

0 commit comments

Comments
 (0)