]> git.mdlowis.com Git - projs/tide.git/commitdiff
moved more shortcuts to common area
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 10 May 2019 01:47:18 +0000 (21:47 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 10 May 2019 01:47:18 +0000 (21:47 -0400)
inc/edit.h
src/lib/shortcuts.c
src/tide.c

index db2a78b9ea1f3414738fc45c7391a53c4444e4f0..8e9fe616780e3acc31873f2855599e69912f94e5 100644 (file)
@@ -207,4 +207,5 @@ void page_dn(char* arg);
 void select_prev(char* arg);
 void undo(char* arg);
 void redo(char* arg);
-
+void newline(char* arg);
+void highlight(char* arg);
index f955d15c27485c6af89554f3f3c3135d3998852c..afcb179ae87650c1e4bc22efe90bb497691caca3 100644 (file)
@@ -155,4 +155,20 @@ void undo(char* arg) {
 void redo(char* arg) {
     view_redo(win_view(FOCUSED));
 }
+
+void newline(char* arg) {
+    (void)arg;
+    View* view = win_view(FOCUSED);
+    if (win_keymodsset(ModShift)) {
+        view_byline(view, UP, false);
+        view_bol(view, false);
+    }
+    view_eol(view, false);
+    view_insert(view, '\n');
+}
+
+void highlight(char* arg) {
+    view_selctx(win_view(FOCUSED));
+}
+
 #pragma GCC diagnostic pop
index 55ff59806764b59086e3d2b41f9981660bf9a61d..e1e337357062551126d9b9e327007b8bcd3dcc31 100644 (file)
@@ -536,22 +536,6 @@ static void new_win(char* arg) {
     cmd_exec(CMD_TIDE);
 }
 
-static void newline(char* arg) {
-    (void)arg;
-    View* view = win_view(FOCUSED);
-    if (win_keymodsset(ModShift)) {
-        view_byline(view, UP, false);
-        view_bol(view, false);
-    }
-    view_eol(view, false);
-    view_insert(view, '\n');
-}
-
-static void highlight(char* arg) {
-    (void)arg;
-    view_selctx(win_view(FOCUSED));
-}
-
 static void lnexec(char* cmd) {
     select_line(NULL);
     exec(cmd, NULL);