ruco 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Readme.md +0 -1
- data/VERSION +1 -1
- data/lib/ruco/core_ext/string.rb +8 -10
- data/lib/ruco/text_area.rb +1 -1
- data/ruco.gemspec +2 -2
- data/spec/ruco/core_ext/string_spec.rb +4 -0
- data/spec/ruco/text_area_spec.rb +9 -0
- metadata +4 -4
data/Readme.md
CHANGED
@@ -84,7 +84,6 @@ TIPS
|
|
84
84
|
TODO
|
85
85
|
=====
|
86
86
|
- do not fall back to 0:0 after undoing the first change
|
87
|
-
- slow when opening file with 10,000+ short lines -> investigate
|
88
87
|
- check writable status every x seconds (e.g. in background) -> faster while typing
|
89
88
|
- search help e.g. 'Nothing found' '#4 of 6 hits' 'no more hits, start from beginning ?'
|
90
89
|
- highlight current work when reopening search (so typing replaces it)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.12
|
data/lib/ruco/core_ext/string.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
class String
|
2
|
+
# fix strange string split behavior without cluttering the knowledge
|
3
|
+
# all over the codebase
|
4
|
+
# " ".split(' ') == []
|
5
|
+
# " ".split(/ /) == []
|
6
|
+
# " ".split(' ',-1) == ['']
|
7
|
+
# " ".naive_split(' ') == ['','','','']
|
2
8
|
def naive_split(pattern)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
while position = string.index(pattern)
|
7
|
-
found << string.slice!(0, position)
|
8
|
-
string.slice!(0,[pattern.size,1].max)
|
9
|
-
end
|
10
|
-
|
11
|
-
found << string
|
12
|
-
found
|
9
|
+
result = split(/#{pattern}/, -1)
|
10
|
+
result.empty? ? [''] : result
|
13
11
|
end
|
14
12
|
|
15
13
|
def tabs_to_spaces!
|
data/lib/ruco/text_area.rb
CHANGED
data/ruco.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruco}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.date = %q{2011-08-
|
12
|
+
s.date = %q{2011-08-28}
|
13
13
|
s.default_executable = %q{ruco}
|
14
14
|
s.email = %q{michael@grosser.it}
|
15
15
|
s.executables = ["ruco"]
|
data/spec/ruco/text_area_spec.rb
CHANGED
@@ -148,6 +148,15 @@ describe Ruco::TextArea do
|
|
148
148
|
text.view.should == "'bar'\n\n"
|
149
149
|
text.selection.should == ([0,0]..[0,5])
|
150
150
|
end
|
151
|
+
|
152
|
+
it "surrounds across lines" do
|
153
|
+
text.insert("ab\ncd\nef")
|
154
|
+
text.move(:to, 0,0)
|
155
|
+
text.selecting{ move(:to, 1,0) }
|
156
|
+
text.insert("'")
|
157
|
+
text.view.should == "'ab\n'cd\nef"
|
158
|
+
text.selection.should == ([0,0]..[1,1])
|
159
|
+
end
|
151
160
|
end
|
152
161
|
end
|
153
162
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 12
|
10
|
+
version: 0.1.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08-
|
18
|
+
date: 2011-08-28 00:00:00 +02:00
|
19
19
|
default_executable: ruco
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|