]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/actions.go
implemented select line as an Action
[micro.git] / cmd / micro / actions.go
index 85ce1bb8169def98ebb78303235b5868ec4aa179..b05abdfb46cef1196d50b43d223b10eec22a3fd6 100644 (file)
@@ -458,6 +458,20 @@ func (v *View) EndOfLine(usePlugin bool) bool {
        return true
 }
 
+// SelectLine selects the entire current line
+func (v *View) SelectLine(usePlugin bool) bool {
+       if usePlugin && !PreActionCall("SelectLine", v) {
+               return false
+       }
+
+       v.Cursor.SelectLine()
+
+       if usePlugin {
+               return PostActionCall("SelectLine", v)
+       }
+       return true
+}
+
 // SelectToStartOfLine selects to the start of the current line
 func (v *View) SelectToStartOfLine(usePlugin bool) bool {
        if usePlugin && !PreActionCall("SelectToStartOfLine", v) {