entry: fix cursor position initialization issues when theme is changed