#42 - fix pasting text to EditField

This commit is contained in:
Vladimir Markelov 2015-11-24 14:05:08 -08:00
parent 6394ffdb3b
commit 88c829b3f6
1 changed files with 5 additions and 2 deletions

View File

@ -311,8 +311,11 @@ func (e *EditField) ProcessEvent(event Event) bool {
clip.WriteAll(e.Title())
return true
case term.KeyCtrlV:
s, _ := clip.ReadAll()
e.SetTitle(s)
if !e.readonly {
s, _ := clip.ReadAll()
e.SetTitle(s)
e.end()
}
return true
default:
if event.Ch != 0 {