niklas-vimmate 0.8.0.1 → 0.8.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/bin/vimmate CHANGED
@@ -59,7 +59,9 @@ fork do
59
59
  controller[:vim].vim
60
60
  end
61
61
  def add_path(path)
62
- file_tree.add_path(path)
62
+ file_tree.initial_adding do
63
+ file_tree.add_path(path)
64
+ end
63
65
  end
64
66
 
65
67
  def post_setup
@@ -6,8 +6,21 @@ module ActiveWindow
6
6
  define_callbacks :after_add
7
7
 
8
8
  def initialize(opts={})
9
+ @initial_add_in_progress = false
9
10
  super(*self.class.column_classes)
10
11
  end
11
12
 
13
+ # disables some heavy calculations
14
+ def initial_adding
15
+ old_progress = initial_add_in_progress?
16
+ @initial_add_in_progress = true
17
+ yield
18
+ @initial_add_in_progress = old_progress
19
+ end
20
+
21
+ def initial_add_in_progress?
22
+ @initial_add_in_progress
23
+ end
24
+
12
25
  end
13
26
  end
@@ -22,7 +22,7 @@ module ActiveWindow
22
22
  def add_with_filter_visibility(file, *args)
23
23
  iter = add_without_filter_visibility(file, *args)
24
24
  filtered_model.set_visibility_for(iter)
25
- filtered_model.refilter
25
+ filtered_model.refilter unless initial_add_in_progress?
26
26
  iter
27
27
  end
28
28
  alias_method_chain :add, :filter_visibility
@@ -26,7 +26,7 @@ class FileTreeStore < ActiveWindow::ActiveTreeStore
26
26
  iter = add file, parent || find_by_full_path( File.dirname(path) )
27
27
  if file.directory?
28
28
  file.children_paths.each do |child|
29
- add_path child, iter
29
+ add_path(child, iter)
30
30
  end
31
31
  end
32
32
  end
data/vimmate.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{vimmate}
5
- s.version = "0.8.0.1"
5
+ s.version = "0.8.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Niklas Hofer", "Stefan Bethge"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niklas-vimmate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.1
4
+ version: 0.8.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niklas Hofer