mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-02 19:00:17 +09:00
CutLine: cosmetic refactoring
This commit is contained in:
@@ -1220,17 +1220,17 @@ func (h *BufPane) CutLine() bool {
|
||||
|
||||
// Cut the selection to the system clipboard
|
||||
func (h *BufPane) Cut() bool {
|
||||
if h.Cursor.HasSelection() {
|
||||
h.Cursor.CopySelection(clipboard.ClipboardReg)
|
||||
h.Cursor.DeleteSelection()
|
||||
h.Cursor.ResetSelection()
|
||||
h.freshClip = true
|
||||
InfoBar.Message("Cut selection")
|
||||
|
||||
h.Relocate()
|
||||
return true
|
||||
if !h.Cursor.HasSelection() {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
h.Cursor.CopySelection(clipboard.ClipboardReg)
|
||||
h.Cursor.DeleteSelection()
|
||||
h.Cursor.ResetSelection()
|
||||
h.freshClip = true
|
||||
InfoBar.Message("Cut selection")
|
||||
|
||||
h.Relocate()
|
||||
return true
|
||||
}
|
||||
|
||||
// DuplicateLine duplicates the current line or selection
|
||||
|
||||
Reference in New Issue
Block a user