]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix bug in TextMate bundle when using the see or help commands on the first word...
authorJoe Groff <arcata@gmail.com>
Sun, 3 Feb 2008 18:24:28 +0000 (10:24 -0800)
committerJoe Groff <arcata@gmail.com>
Sun, 3 Feb 2008 18:24:28 +0000 (10:24 -0800)
extra/bunny/model/model.factor
misc/Factor.tmbundle/Support/lib/tm_factor.rb

index a19adcb7825635a00c5968d0685ad48d26547ee6..e3df6bb26c7a05ab025ea533a9215315b5f098bb 100644 (file)
@@ -111,4 +111,3 @@ M: bunny-buffers dispose
     "1.5" { "GL_ARB_vertex_buffer_object" }
     has-gl-version-or-extensions?
     [ <bunny-buffers> ] [ <bunny-dlist> ] if ;
-
index 54272e5e3695595531c56ae85dadaff6b1249eb0..2775a12ae9f621af1272a8a5bad41c186c4b1bbb 100644 (file)
@@ -33,6 +33,6 @@ def doc_using_statements(document)
 end
 
 def line_current_word(line, point)
-    left = line.rindex(/\s|^/, point - 1) + 1; right = line.index(/\s|$/, point) - 1
+    left = line.rindex(/\s/, point - 1) || 0; right = line.index(/\s/, point) || line.length
     line[left..right]
 end