lib/textbringer/mode.rb in textbringer-0.2.7 vs lib/textbringer/mode.rb in textbringer-0.2.8

- old
+ new

@@ -4,10 +4,14 @@ class Mode extend Commands include Commands @@mode_list = [] + + DEFAULT_SYNTAX_TABLE = { + control: /[\0-\t\v-\x1f\x7f\u{3000}]+/ + } def self.list @@mode_list end @@ -59,10 +63,10 @@ child.hook_name = hook define_command(command) do Buffer.current.apply_mode(child) end @@mode_list.push(child) - child.instance_variable_set(:@syntax_table, {}) + child.instance_variable_set(:@syntax_table, DEFAULT_SYNTAX_TABLE.dup) end attr_reader :buffer def initialize(buffer)