Method: Textbringer::TCodeInputMethod#show_stroke

Defined in:
lib/textbringer/input_methods/t_code_input_method.rb

#show_strokeObject



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/textbringer/input_methods/t_code_input_method.rb', line 410

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] = ""
  s[y] = ""
  message = s.gsub(/.{10}/, "\\&\n").gsub(/ /, "  ")
  show_help(message)
  Window.redisplay
  nil
end