Several of the plugin loading methods have been joined into one plugin
file that will be loaded by updating the runtimepath. More informative
error messages will be displayed if Python support is missing or if the
module import fails.
Note that this commit will break existing plugin loading, the new
method with updating the runtimepath will be required.
Closes#156.
Closes#181.
Because vim doesn't trigger any autocmds after leaving a cmdwin the
statusline in the window the user returned to from the cmdwin would be
highlighted as non-current even if it should have been current.
This issue is resolved by storing the last current window ID in a script
variable, and when leaving the cmdwin we show the last current window as
current instead of detecting it after the WinEnter autocmd has been
triggered (which doesn't happen after leaving a cmdwin).
Closes#184.
The previous change obviously didn't work for renderers like the Pango
markup renderer since the highlighting code uses regular spaces and not
no-break spaces. Now spaces are replaced in the contents and dividers
only, and it's done before highlighting the segment so the added
highlighting code stays untouched.
Refs #113.
This commit introduces the following changes to themes and segment
rendering:
- Spacer segments are now regular string/function type segments with
"width": "auto" in the themes.
- The "rjust"/"ljust" properties have been replaced by the "width"
option combined with a new "align" option.
- Renderer._render_segments() is now a generator which renders each
segment separately, and assigns the rendered contents to
"_rendered_hl" and "_rendered_raw" in the segment dict.
- Renderer.render() returns the segments by joining the "_rendered_hl"
values for each segment.
- Spacer segment widths are calculated in the render() method, and
assigned to "_space_left" and "_space_right" in the segment dict.
These spaces are then applied in Renderer._render_segments().
- All space characters are converted to no-break spaces (U+00A0) in the
"_rendered_hl" property.
Refs #113.
Refs #154.
Some applications using Pango and/or Cairo draw square unknown character
glyphs next to divider glyphs instead of regular spaces. Non-breaking
spaces resolves this issue, and they are probably more correct to use
(no application should break lines at the padding spaces since they
"glue" the segment and dividers together as one unit).
This commit appears to work fine in all supported applications on Linux.
This commit resolves the gvim font rendering problems mentioned in
issue #113.
Awesome WM uses the Pango Text Attribute Markup Language
(http://developer.gnome.org/pango/stable/PangoMarkupFormat.html), and
since other applications and window managers may use the same markup
language it's better to have a common renderer for this markup language.
Modules can now be any string, and an informative error message will be
written to sys.stdout if the module doesn't exist. The
`last_pipe_status` argument will also automatically be split into
a list.
This allows the hl() methods to wrap highlighting code *around* the
segment contents, this is required for e.g. Pango markup in Awesome
statuslines (segments must be wrapped in <span ...>...</span> tags).