diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-09-10 19:22:57 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-09-10 19:22:57 +0000 |
commit | 578b49e4f7caaf0e20ff63c1f08e6bc5fe0245ed (patch) | |
tree | f90f3d0684c0f25636b36b8d23baa3fcadb5c262 /src/screen.c | |
parent | 32330d3c679024a006f69dea73acc878f4c36df7 (diff) | |
download | vim-578b49e4f7caaf0e20ff63c1f08e6bc5fe0245ed.zip |
updated for version 7.0145
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c index 269c7802a..6e2547188 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2401,6 +2401,7 @@ fill_foldcolumn(p, wp, closed, lnum) int i = 0; int level; int first_level; + int empty; /* Init to all spaces. */ copy_spaces(p, (size_t)wp->w_p_fdc); @@ -2408,13 +2409,16 @@ fill_foldcolumn(p, wp, closed, lnum) level = win_foldinfo.fi_level; if (level > 0) { + /* If there is only one column put more info in it. */ + empty = (wp->w_p_fdc == 1) ? 0 : 1; + /* If the column is too narrow, we start at the lowest level that * fits and use numbers to indicated the depth. */ - first_level = level - wp->w_p_fdc - closed + 2; + first_level = level - wp->w_p_fdc - closed + 1 + empty; if (first_level < 1) first_level = 1; - for (i = 0; i + 1 < wp->w_p_fdc; ++i) + for (i = 0; i + empty < wp->w_p_fdc; ++i) { if (win_foldinfo.fi_lnum == lnum && first_level + i >= win_foldinfo.fi_low_level) |