lib/ver/syntax/processor.rb in ver-2009.12.14 vs lib/ver/syntax/processor.rb in ver-2010.02
- old
+ new
@@ -8,11 +8,11 @@
end
def end_parsing(syntax_name)
tags.each do |name, indices|
tag_name = theme.get(name) || name
- textarea.fast_tag_add(tag_name, *indices)
+ textarea.tag_add(tag_name, *indices)
end
@tag_stack.uniq!
@tag_stack.each_cons(2){|under, over| textarea.tag_raise(under, over) }
@@ -22,11 +22,11 @@
def new_line(line)
self.lineno += 1
end
def open_tag(name, pos)
- stack << [name, pos]
+ stack << [name, lineno, pos]
if tag_name = theme.get(name)
if stack.size > 1
below_name = stack[-2][0]
below = theme.get(below_name)
@@ -35,12 +35,12 @@
end
end
end
def close_tag(name, mark)
- sname, pos = stack.pop
+ from_name, from_lineno, pos = stack.pop
- tags[name] << "#{lineno}.#{pos}" << "#{lineno}.#{mark}"
+ tags[name] << "#{from_lineno}.#{pos}" << "#{lineno}.#{mark}"
rescue RuntimeError => exception
# if you modify near the end of the textarea, sometimes the last tag
# cannot be closed because the contents of the textarea changed since
# the last highlight was issued.
# this will cause Tk to raise an error that doesn't have a message and