Commit Graph

16 Commits

Author SHA1 Message Date
ZyX 3ebc16a48c Replace pl.environ/getcwd/home with segment_info 2013-03-30 21:55:00 +04:00
ZyX 7646c949e2 Automatically reload configuration
Needs testing
2013-03-25 18:24:17 +04:00
ZyX 80ddbfbf9a Split Powerline.__init__ into __init__ and create_renderer
Target: with long-living Powerline objects periodically reload configuration 
recreating renderer. Use file watchers to watch for configuration. Configuration 
should be able to be safely reloaded in non-blocking mode in a separate thread 
up to the time when it comes to recreating renderer.

This commit does not add anything that actually reloads the configuration, 
multiple runs of .create_renderer were not tested.
2013-03-25 18:24:16 +04:00
ZyX ed435f8063 Add required pl argument to segments
Fixes #340
Ref #330
2013-03-24 19:44:01 +04:00
ZyX c4e5ff8b49 Added support for all powerline prompts (in2, out, rewrite)
Also fixed problem with prompt not really updating.

Fixes #141
2013-03-24 05:23:33 +04:00
ZyX b1f9edab4c Remove get_segment_info and passing segment_info through globals 2013-03-24 05:23:33 +04:00
ZyX 260a0dafcb Add tests for the constantly recreated *Powerline instances 2013-03-19 00:42:32 +04:00
ZyX b0495d028f Do not let daemon threads be stopped while being updated 2013-03-18 07:56:25 +04:00
ZyX b2b05cb81c Removed underscore_to_camelcase
No need to bother both developers (that need to create class names compatible 
with file name, which is not obvious if not looking into main Powerline class) 
and computer (that needs to recompute class name each time) if it is possible to 
bother only developers (or only computer, but this contributes to higher startup 
times).

About not obvious: when you look into zsh_prompt.py and see only 
ZshPromptRenderer name you only think that powerline upstream is following 
strict code style. You don’t think there is a technical reason for such naming, 
like you don’t think there is technical reason for having blank lines. When you 
look into zsh_prompt.py and see `renderer = ZshPromptRenderer` it is obvious 
that there is technical reason for writing code this way because new variable is 
never used in the module itself.
2013-03-11 22:22:18 +04:00
ZyX 2c445a9356 Add more tests to test_configuration
Dynamic configuration tests. Purpose: make sure that default configuration does 
not throw. Tests catch only very trivial problems (like missing imports after
refactoring)
2013-03-11 22:09:34 +04:00
Kim Silkebækken 111eaa27e8 Combine vim modelines and Python encoding declarations
Ref #314
2013-03-11 10:40:09 +01:00
Kim Silkebækken 6748701fcb Add vim modelines to all Python files
Added with `sed -i '2i# vim:fenc=utf-8:noet' `find -name '*.py'`` and
fixed in a couple of files without the UTF-8 encoding on top.

Ref #314
2013-03-11 08:11:25 +01:00
ZyX aa0a8bf76d Make tests support python2.6
Old unittest is not working for unknown reason, using unittest2 instead
2013-03-03 21:03:40 +01:00
ZyX 0a05b2961a Add support for with: statement to tests.vim
Also made everything use new vim_module._with where possible
2013-03-03 21:03:34 +01:00
ZyX c429d9eeb2 Omit using sys.modules if possible
Does not work though: still TypeError due to some global in multiproccessing
that got None
2013-03-03 21:03:34 +01:00
ZyX 584755765b Start adding tests
Tests are temporary disabled on all branches except tests (does not really work
though, needs travis.yml in all branches).
2013-03-03 21:03:19 +01:00