patch 8.2.2854: custom statusline cannot contain % items
Problem: Custom statusline cannot contain % items.
Solution: Add "%{% expr %}". (closes #8190)
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index efab648..9cff98d 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7339,6 +7339,18 @@
Note that there is no '%' before the closing '}'. The
expression cannot contain a '}' character, call a function to
work around that. See |stl-%{| below.
+ {% - This is almost same as { except the result of the expression is
+ re-evaluated as a statusline format string. Thus if the
+ return value of expr contains % items they will get expanded.
+ The expression can contain the } character, the end of
+ expression is denoted by %}.
+ The For example: >
+ func! Stl_filename() abort
+ return "%t"
+ endfunc
+< `stl=%{Stl_filename()}` results in `"%t"`
+ `stl=%{%Stl_filename()%}` results in `"Name of current file"`
+ } - End of `{%` expression
( - Start of item group. Can be used for setting the width and
alignment of a section. Must be followed by %) somewhere.
) - End of item group. No width fields allowed.