Fix update completion for empty reference

issue3890
review12271002
(grafted from b5dfbddfcd96c62b61b9e4c5f38514eec95adfaa)

--HG--
branch : 3.2
extra : source : b5dfbddfcd96c62b61b9e4c5f38514eec95adfaa
Use the right widget to get text in Char widget

issue3898
review9301002
(grafted from 64eae7781c5170b8c3339c01857263cab5177129)

--HG--
branch : 3.2
extra : source : 64eae7781c5170b8c3339c01857263cab5177129