Commit 145e9ad51e7e08e7546d6e4691ba56e58d97b3fc
- Date: Mon Apr 21 21:25:05 +0000 2008
- Committer: Tim Harper (timcharper@gmail.com)
- Author: Tim Harper (timcharper@gmail.com)
- Commit SHA1: 145e9ad51e7e08e7546d6e4691ba56e58d97b3fc
- Tree SHA1: 632eecd802334eaacebf0d665c78a044858f9aac
bugfix - "Jump to file" was sometimes throwing a unexpected nil related error when no text selected, on last line, and no text on last line.
Commit diff
| |   |
| 74 | 74 | |
| 75 | 75 | line = |
| 76 | 76 | case options[:input_type] |
| 77 | | when :doc then doc.split("\n")[line_number - 1] |
| 77 | when :doc then doc.split("\n")[line_number - 1].to_s |
| 78 | 78 | when :line then doc |
| 79 | 79 | else |
| 80 | 80 | raise "Can't handle input_type #{options[:input_type]} for tm_expanded_selection" |
| toggle raw diff |
--- a/Support/lib/ruby_tm_helpers.rb
+++ b/Support/lib/ruby_tm_helpers.rb
@@ -74,7 +74,7 @@ def tm_expanded_selection(options = {})
line =
case options[:input_type]
- when :doc then doc.split("\n")[line_number - 1]
+ when :doc then doc.split("\n")[line_number - 1].to_s
when :line then doc
else
raise "Can't handle input_type #{options[:input_type]} for tm_expanded_selection" |