Fix history not to insert empty pattern by histget(0)
Merge pull request #62 from haya14busa/fix-empty-hist

Fix history not to insert empty pattern by histget(0)