Commit 395c9b2a81f2aaa10cbf3d81927504cb062e7a77
- Date: Fri Jul 11 20:21:10 +0000 2008
- Committer: Tim Harper (timcharper@gmail.com)
- Author: Tim Harper (timcharper@gmail.com)
- Commit SHA1: 395c9b2a81f2aaa10cbf3d81927504cb062e7a77
- Tree SHA1: 7b7e4f3597a9c0faf2fca9a3438f266a430c81bd
bugfix - auto-expanding selection when the cursor is at the very first column no longer yields a double
Commit diff
| |   |
| 81 | 81 | end |
| 82 | 82 | |
| 83 | 83 | last_part = line[ (col_number - 1)..-1] |
| 84 | | first_part = line[ 0..col_number - 2] |
| 84 | first_part = col_number == 1 ? "" : line[ 0..col_number - 2] |
| 85 | 85 | |
| 86 | 86 | last_part.gsub!(/^(#{options[:forward]}){0,1}.*$/i) { $1 } |
| 87 | 87 | |
| toggle raw diff |
--- a/Support/lib/ruby_tm_helpers.rb
+++ b/Support/lib/ruby_tm_helpers.rb
@@ -81,7 +81,7 @@ def tm_expanded_selection(options = {})
end
last_part = line[ (col_number - 1)..-1]
- first_part = line[ 0..col_number - 2]
+ first_part = col_number == 1 ? "" : line[ 0..col_number - 2]
last_part.gsub!(/^(#{options[:forward]}){0,1}.*$/i) { $1 }
|