diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2018-02-26 11:14:21 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2018-02-26 11:14:21 +0100 |
commit | 0023e0929ac7075cd008e0093de58ddc89efd597 (patch) | |
tree | 68e8ab40c955a89ee98e9c667dff12837a58b0fb /view.go | |
parent | 0e86accb588445f09b07ec68e6cc62903f9ba7bd (diff) | |
download | poe-0023e0929ac7075cd008e0093de58ddc89efd597.tar.gz poe-0023e0929ac7075cd008e0093de58ddc89efd597.tar.bz2 poe-0023e0929ac7075cd008e0093de58ddc89efd597.zip |
Bulk commit before redesign in another branch.
Diffstat (limited to 'view.go')
-rw-r--r-- | view.go | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -395,7 +395,7 @@ func (v *View) HandleEvent(ev tcell.Event) { return } - if ev.Modifiers()&tcell.ModCtrl != 0 { // identic code to Btn3 + if ev.Modifiers()&tcell.ModShift != 0 { // identic code to Btn3 pos := v.XYToOffset(mx, my) // if we clicked inside a current selection, open that one q0, q1 := v.text.Dot() @@ -429,6 +429,7 @@ func (v *View) HandleEvent(ev tcell.Event) { } else { // single click v.SetCursor(pos, 0) + //screen.ShowCursor(3, 3) } v.mclicktime = ev.When() case tcell.WheelUp: // scrollup @@ -597,7 +598,11 @@ func (v *View) HandleEvent(ev tcell.Event) { RunCommand(cmd) return case tcell.KeyCtrlC: // copy to clipboard - if err := clipboard.WriteAll(v.text.ReadDot()); err != nil { + str := v.text.ReadDot() + if str == "" { + return + } + if err := clipboard.WriteAll(str); err != nil { printMsg("%s\n", err) } return |