Method: Textbringer::TCodeInputMethod#show_stroke
- Defined in:
- lib/textbringer/input_methods/t_code_input_method.rb
#show_stroke ⇒ Object
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/textbringer/input_methods/t_code_input_method.rb', line 395 def show_stroke c = Buffer.current.char_after x, y = KANJI_TABLE.find.with_index { |row, i| j = row.index(c) if j break [j, i] else false end } if x.nil? raise EditorError, "Stroke not found" end s = " " * 10 + "・・・・ ・・・・" * 3 s[x] = "1" s[y] = "2" = s.gsub(/.{10}/, "\\&\n").gsub(/ /, " ") show_help() Window.redisplay nil end |