From cedf8c62f80ce8c2cdd8fc92ff8507767c15cff7 Mon Sep 17 00:00:00 2001 From: Le Viet Hoang Dung Date: Thu, 13 Sep 2018 11:59:07 +0700 Subject: [PATCH] Add frontend handling for move line --- Sources/XiEditor/EditViewController.swift | 8 ++++++++ Sources/XiEditor/Main.storyboard | 13 +++++++++++++ xi-editor | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Sources/XiEditor/EditViewController.swift b/Sources/XiEditor/EditViewController.swift index 345e9930..9808434d 100644 --- a/Sources/XiEditor/EditViewController.swift +++ b/Sources/XiEditor/EditViewController.swift @@ -509,6 +509,14 @@ class EditViewController: NSViewController, EditViewDataSource, FindDelegate, Sc document.sendRpcAsync("clear_recording", params: ["recording_name": "DEFAULT"]) } + @objc func moveLineUp(_ sender: AnyObject?) { + document.sendRpcAsync("move_line_up", params: []) + } + + @objc func moveLineDown(_ sender: AnyObject?) { + document.sendRpcAsync("move_line_down", params: []) + } + fileprivate func cutCopy(_ method: String) { if let result = document?.sendRpc(method, params: []) { switch result { diff --git a/Sources/XiEditor/Main.storyboard b/Sources/XiEditor/Main.storyboard index 3dec32f1..84c75af7 100644 --- a/Sources/XiEditor/Main.storyboard +++ b/Sources/XiEditor/Main.storyboard @@ -1029,6 +1029,19 @@ Gw + + + + + + + + + + + + + diff --git a/xi-editor b/xi-editor index 35fc2962..762bb82c 160000 --- a/xi-editor +++ b/xi-editor @@ -1 +1 @@ -Subproject commit 35fc29624c32cfc5a904100b9ce0c9dca8a8a1e7 +Subproject commit 762bb82c25f9dabfeb7d7d374d8cc781e5135564