2009/10/21 Jérémie Roquet <[email protected]>:
> I've just started to use Vim, and missed the possibility to display
> middle-dots (or any other visible character) instead of spaces, so I
> made the following patch.
> [...]
I'm sorry, the previous patch cause a segmentation fault if you don't
use the "space" argument.
The following fixes this (added "&& lcs_space" in screen.c).
Again, sorry for this.
Best regards,
Index: option.c
===================================================================
--- option.c (revision 1626)
+++ option.c (working copy)
@@ -6847,6 +6847,7 @@
{&lcs_ext, "extends"},
{&lcs_nbsp, "nbsp"},
{&lcs_prec, "precedes"},
+ {&lcs_space, "space"},
{&lcs_tab2, "tab"},
{&lcs_trail, "trail"},
};
Index: screen.c
===================================================================
--- screen.c (revision 1626)
+++ screen.c (working copy)
@@ -3886,6 +3886,18 @@
#endif
}
+ /* 'list' : change space to lcs_space. */
+ if (wp->w_p_list && c == ' ' && lcs_space)
+ {
+ c = lcs_space;
+ if (area_attr == 0 && search_attr == 0)
+ {
+ n_attr = 1;
+ extra_attr = hl_attr(HLF_8);
+ saved_attr2 = char_attr; /* save current attr */
+ }
+ }
+
if (extra_check)
{
#ifdef FEAT_SPELL
@@ -4040,7 +4052,7 @@
}
#endif
- if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
+ if (trailcol != MAXCOL && ptr > line + trailcol && (c == ' ' ||
c
== lcs_space && lcs_space))
{
c = lcs_trail;
if (!attr_pri)
Index: globals.h
===================================================================
--- globals.h (revision 1626)
+++ globals.h (working copy)
@@ -1146,6 +1146,7 @@
EXTERN int lcs_tab1 INIT(= NUL);
EXTERN int lcs_tab2 INIT(= NUL);
EXTERN int lcs_trail INIT(= NUL);
+EXTERN int lcs_space INIT(= NUL);
#if defined(FEAT_WINDOWS) || defined(FEAT_WILDMENU) || defined(FEAT_STL_OPT) \
|| defined(FEAT_FOLDING)
--
Jérémie Roquet - Arkanosis
Programming artist
Developer in natural language processing - Exalead
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---