Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f76d607

Browse files
committed
Merge pull request python-mode#522 from sscherfke/develop
Fix issue python-mode#519 – fold text truncated when relativenumber is set.
2 parents 95c4190 + da4d8b2 commit f76d607

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/pymode/folding.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ fun! pymode#folding#text() " {{{
2323
endif
2424
let line = getline(fs)
2525

26-
let nucolwidth = &fdc + &number * &numberwidth
26+
let has_numbers = &number || &relativenumber
27+
let nucolwidth = &fdc + has_numbers * &numberwidth
2728
let windowwidth = winwidth(0) - nucolwidth - 6
2829
let foldedlinecount = v:foldend - v:foldstart
2930

0 commit comments

Comments
 (0)