private static void CopySelectionOrLine() { var scintilla = new ScintillaGateway(PluginBase.GetCurrentScintilla()); if (scintilla.GetSelectionLength() != 0) { scintilla.Copy(); } else { scintilla.CopyAllowLine(); } }