1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-20 02:07:39 +00:00

cleanup + global clipboard

This commit is contained in:
kepler155c@gmail.com
2017-10-11 22:39:04 -04:00
parent f9221e67be
commit 3460dd68b2
6 changed files with 59 additions and 87 deletions

View File

@@ -144,13 +144,8 @@ function Manager:init()
end)
singleThread('paste', function(text)
if clipboard.isInternal() then
text = clipboard.getData()
end
if text and type(text) == 'string' then
self:emitEvent({ type = 'paste', text = text })
self.currentPage:sync()
end
self:emitEvent({ type = 'paste', text = text })
self.currentPage:sync()
end)
singleThread('char', function(ch)
@@ -1683,7 +1678,6 @@ function UI.Grid:eventHandler(event)
elseif event.type == 'copy' then
if self.selected then
clipboard.setData(Util.tostring(self.selected))
clipboard.useInternal(true)
end
else
return false