lib/textbringer/modes/c_mode.rb in textbringer-1.2.0 vs lib/textbringer/modes/c_mode.rb in textbringer-1.3.0

- old
+ new

@@ -1,8 +1,8 @@ module Textbringer CONFIG[:c_indent_level] = 4 - CONFIG[:c_indent_tabs_mode] = true + CONFIG[:c_indent_tabs_mode] = false CONFIG[:c_continued_statement_offset] = 4 CONFIG[:c_case_label_offset] = -4 CONFIG[:c_label_offset] = -2 class CMode < ProgrammingMode @@ -185,10 +185,10 @@ text = $& token_name = TOKEN_NAMES.find { |name| $~[name] } if text.empty? raise EditorError, "Empty token: (#{line},#{column}) #{$~.inspect}" end - tokens.push([[line, column], token_name, text]) + tokens.push([[line, column], token_name, CANONICAL_PUNCTUATORS[text]]) lf_count = text.count("\n") if lf_count > 0 line += lf_count column = text.slice(/[^\n]*\z/).size else