#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()) clip.WriteAll(e.Title())
return true return true
case term.KeyCtrlV: case term.KeyCtrlV:
s, _ := clip.ReadAll() if !e.readonly {
e.SetTitle(s) s, _ := clip.ReadAll()
e.SetTitle(s)
e.end()
}
return true return true
default: default:
if event.Ch != 0 { if event.Ch != 0 {