diff options
author | hut <hut@lavabit.com> | 2009-07-06 17:45:06 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-06 17:45:06 +0200 |
commit | f037fa4ba89527eff741b3889b70ecb84b0b83f0 (patch) | |
tree | 9977320279712da5b73b3638066fa1ebd751d763 /code | |
parent | 4ed0c6e8cd44b32e7bbe4935dd20fc7554166fac (diff) | |
download | ranger-f037fa4ba89527eff741b3889b70ecb84b0b83f0.tar.gz |
Fm.externally(&block) for wrapping code in closei/starti
Diffstat (limited to 'code')
-rw-r--r-- | code/fm.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/code/fm.rb b/code/fm.rb index 6db5a85e..cb7dacb6 100644 --- a/code/fm.rb +++ b/code/fm.rb @@ -113,6 +113,14 @@ module Fm CLI::lines - @bars.size end + def externally(&block) + return unless block_given? + + closei + yield + starti + end + def dump if defined? @dump_config_on_exit begin |