From: Mark Weston Date: Mon, 23 Apr 2018 19:34:45 +0000 (+0300) Subject: Make ^X act like ^K when nothing is selected (#1092) X-Git-Tag: v1.4.1~16^2 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b181342ff1117c1014323eb4bef5188b7f2ec7f4;p=micro.git Make ^X act like ^K when nothing is selected (#1092) * Make ^X act like ^K when nothing is selected ^K is hard to reach with your left hand or requires to use both hands Also with this you could remove ^K whatsoever and make room for a different command This is how I configured nano by the way Line duplication also becomes nearly instantaneous with a flash-quick ^X+^V+^V combo (nano doesn't have a dedicated shortcut) Small block (5-10 lines) cuts/copies/duplicates can also be made this way * Remove unnecessary lines * Call CutLine the right way --- diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index 4d52e79b..a291c88d 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -1219,9 +1219,9 @@ func (v *View) Cut(usePlugin bool) bool { return PostActionCall("Cut", v) } return true + } else { + return v.CutLine(usePlugin) } - - return false } // DuplicateLine duplicates the current line or selection