mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
@@ -54,6 +54,7 @@ var bindingActions = map[string]func(*View) bool{
|
|||||||
"Cut": (*View).Cut,
|
"Cut": (*View).Cut,
|
||||||
"CutLine": (*View).CutLine,
|
"CutLine": (*View).CutLine,
|
||||||
"DuplicateLine": (*View).DuplicateLine,
|
"DuplicateLine": (*View).DuplicateLine,
|
||||||
|
"DeleteLine": (*View).DeleteLine,
|
||||||
"Paste": (*View).Paste,
|
"Paste": (*View).Paste,
|
||||||
"SelectAll": (*View).SelectAll,
|
"SelectAll": (*View).SelectAll,
|
||||||
"OpenFile": (*View).OpenFile,
|
"OpenFile": (*View).OpenFile,
|
||||||
@@ -859,6 +860,18 @@ func (v *View) DuplicateLine() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteLine deletes the current line
|
||||||
|
func (v *View) DeleteLine() bool {
|
||||||
|
v.Cursor.SelectLine()
|
||||||
|
if !v.Cursor.HasSelection() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
v.Cursor.DeleteSelection()
|
||||||
|
v.Cursor.ResetSelection()
|
||||||
|
messenger.Message("Deleted line")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// Paste whatever is in the system clipboard into the buffer
|
// Paste whatever is in the system clipboard into the buffer
|
||||||
// Delete and paste if the user has a selection
|
// Delete and paste if the user has a selection
|
||||||
func (v *View) Paste() bool {
|
func (v *View) Paste() bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user