return true
}
+// Copy the current line to the clipboard
+func (h *BufPane) CopyLine() bool {
+ if h.Cursor.HasSelection() {
+ return false
+ } else {
+ h.Cursor.SelectLine()
+ h.Cursor.CopySelection("clipboard")
+ h.freshClip = true
+ if clipboard.Unsupported {
+ InfoBar.Message("Copied line (install xclip for external clipboard)")
+ } else {
+ InfoBar.Message("Copied line")
+ }
+ }
+ h.Cursor.Deselect(true)
+ h.Relocate()
+ return true
+}
+
// CutLine cuts the current line to the clipboard
func (h *BufPane) CutLine() bool {
h.Cursor.SelectLine()
"Undo": (*BufPane).Undo,
"Redo": (*BufPane).Redo,
"Copy": (*BufPane).Copy,
+ "CopyLine": (*BufPane).CopyLine,
"Cut": (*BufPane).Cut,
"CutLine": (*BufPane).CutLine,
"DuplicateLine": (*BufPane).DuplicateLine,
"InsertTab": true,
"FindNext": true,
"FindPrevious": true,
+ "CopyLine": true,
"Cut": true,
"CutLine": true,
"DuplicateLine": true,
"CtrlP": "FindPrevious",
"CtrlZ": "Undo",
"CtrlY": "Redo",
- "CtrlC": "Copy",
+ "CtrlC": "CopyLine|Copy",
"CtrlX": "Cut",
"CtrlK": "CutLine",
"CtrlD": "DuplicateLine",
"CtrlP": "FindPrevious",
"CtrlZ": "Undo",
"CtrlY": "Redo",
- "CtrlC": "Copy",
+ "CtrlC": "CopyLine|Copy",
"CtrlX": "Cut",
"CtrlK": "CutLine",
"CtrlD": "DuplicateLine",
Undo
Redo
Copy
+CopyLine
Cut
CutLine
DuplicateLine
"CtrlP": "FindPrevious",
"CtrlZ": "Undo",
"CtrlY": "Redo",
- "CtrlC": "Copy",
+ "CtrlC": "CopyLine|Copy",
"CtrlX": "Cut",
"CtrlK": "CutLine",
"CtrlD": "DuplicateLine",