Closed moteus closed 4 years ago
@moteus, I'm not sure it warrants changes in the IDE (I couldn't come up with a good UI for it), but you can definitely add a menu item to paste to the Output window using something like this:
package {
onMenuOutput = function(self, menu, editor)
local idpaste = ID(self.fname..".output.paste")
local function paste(event)
local ro = editor:GetReadOnly()
editor:SetReadOnly(false)
editor:PasteDyn()
editor:GetReadOnly(ro)
end
menu:Append(idpaste, "Paste from Clipboard")
editor:Connect(idpaste, wx.wxEVT_COMMAND_MENU_SELECTED, paste)
end
}
You can turn off ReadOnly status in a similar way.
At first thanks for the code snipped - it works.
But why just not to add Read only
flag to the config.
I have no problem with editable console.
In Scite it is even possible tu run system commands from it - so it is analog for shell.
@moteus, let me think about it. I think disabling read-only status is probably a bit too much (as it would allow users to mess up the output), but read-only should be only set once, so the user can easily change it (once) if desired. I'll review the code to make sure it's not explicitly set to RO outside of the initialization code.
My use case is to be able copy full stacktrace from logfile and paste it to the output cosole to be able to navigate in the project code. I use it in the SciTE, and also i found that some times I also need to edit some output as whell.