File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,17 @@ def initialize(source, encoding)
142
142
# Finds the character index inside the source string for a given line and column
143
143
sig { params ( position : T ::Hash [ Symbol , T . untyped ] ) . returns ( Integer ) }
144
144
def find_char_position ( position )
145
+ info_t = Thread . new do
146
+ sleep 10
147
+
148
+ puts "Looking for char position for over 10 seconds. Starting debug loop."
149
+
150
+ loop do
151
+ puts "POS: #{ @pos } Encoding: #{ @encoding } CurrentLine: #{ @current_line } " )
152
+ sleep 0.5
153
+ end
154
+ end
155
+
145
156
# Find the character index for the beginning of the requested line
146
157
until @current_line == position [ :line ]
147
158
@pos += 1 until LINE_BREAK == @source [ @pos ]
@@ -157,6 +168,9 @@ def find_char_position(position)
157
168
requested_position -= utf_16_character_position_correction ( @pos , requested_position )
158
169
end
159
170
171
+ info_t . kill
172
+ info_t . join
173
+
160
174
requested_position
161
175
end
162
176
You can’t perform that action at this time.
0 commit comments