]> git.mdlowis.com Git - projs/tide.git/commitdiff
change EOL toggling tag to use internal logic to perform the translation.
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 18 Sep 2018 16:28:46 +0000 (12:28 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 18 Sep 2018 16:28:46 +0000 (12:28 -0400)
tide.c

diff --git a/tide.c b/tide.c
index ecebb7f71441a86d0396912d92188c383a497e05..51e1f378615f3e44ee821c07cfba32cbb092dd05 100644 (file)
--- a/tide.c
+++ b/tide.c
@@ -25,8 +25,6 @@ char* FetchCmd[] = { "tfetch", NULL, NULL };
 
 #define CMD_TIDE     "!tide"
 #define CMD_PICKFILE "!pickfile ."
-#define CMD_TO_DOS   "|unix2dos"
-#define CMD_TO_UNIX  "|dos2unix"
 #define CMD_COMPLETE "<picktag print tags"
 #define CMD_GOTO_TAG "!picktag fetch tags"
 
@@ -362,7 +360,11 @@ static void indent(char* arg) {
 
 static void eol_mode(char* arg) {
     DosLineFeed = !DosLineFeed;
-    cmd_exec(DosLineFeed ? CMD_TO_DOS : CMD_TO_UNIX);
+    View* view = win_view(EDIT);
+    view_selectall(view);
+    char* txt = view_getstr(view);
+    view_putstr(view, txt);
+    free(txt);
 }
 
 static void new_win(char* arg) {