Hello!
I find reading the folded lines to be less than ideal, as the extra
spacing required of the "+---"s varies and so lines: doesn't line up.
This patch makes all the +---... prefixes take up 5 spaces (using %-5s,
so it uses padding). By itself, this makes the folded sections, no
matter how deep, also line up; the patch now pads the beginning of the
folding titles with spaces indicating folding depth (and retaining the
+---- marking).
I find the result to be more quickly legible.
Regards,
Chip Campbell
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
*** keep_eval.c 2014-09-10 10:50:35.997331712 -0400
--- eval.c 2014-09-10 10:53:02.878652619 -0400
***************
*** 11063,11078 ****
s = skipwhite(s + 1);
}
}
! txt = _("+-%s%3ld lines: ");
r = alloc((unsigned)(STRLEN(txt)
! + STRLEN(vimvars[VV_FOLDDASHES].vv_str) /* for %s */
! + 20 /* for %3ld */
! + STRLEN(s))); /* concatenated */
if (r != NULL)
{
sprintf((char *)r, txt, vimvars[VV_FOLDDASHES].vv_str,
(long)((linenr_T)vimvars[VV_FOLDEND].vv_nr
! - (linenr_T)vimvars[VV_FOLDSTART].vv_nr + 1));
len = (int)STRLEN(r);
STRCAT(r, s);
/* remove 'foldmarker' and 'commentstring' */
--- 11063,11082 ----
s = skipwhite(s + 1);
}
}
! txt = _("+-%-5s%4ld lines:%*s");
r = alloc((unsigned)(STRLEN(txt)
! + STRLEN(vimvars[VV_FOLDDASHES].vv_str) /* for %s
*/
! + 30 /* for %4ld and
padding */
! + STRLEN(s))); /* concatenated
*/
if (r != NULL)
{
+ int padding;
+ padding= STRLEN(vimvars[VV_FOLDDASHES].vv_str);
+ if(padding > 5) padding= 5;
sprintf((char *)r, txt, vimvars[VV_FOLDDASHES].vv_str,
(long)((linenr_T)vimvars[VV_FOLDEND].vv_nr
! - (linenr_T)vimvars[VV_FOLDSTART].vv_nr + 1),
! padding," ");
len = (int)STRLEN(r);
STRCAT(r, s);
/* remove 'foldmarker' and 'commentstring' */