tex: for ec_exec, '|' is not a command separator - neatvi - [fork] simple vi-type editor with UTF-8 support
 (HTM) git clone git://src.adamsgaard.dk/neatvi
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 22b03572dac915a7d752a9d5b182355d2e46cb88
 (DIR) parent 6aeab587bb3e6603d53567d8b231b36c72ad194b
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Thu,  9 Jan 2020 10:04:12 +0330
       
       ex: for ec_exec, '|' is not a command separator
       
       Suggested by Aaron G <mastaag@gmail.com>.
       
       Diffstat:
         M ex.c                                |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/ex.c b/ex.c
       t@@ -955,13 +955,13 @@ static struct excmd {
        /* read an ex command and its arguments from src into dst */
        static void ex_line(int (*ec)(char *s), char *dst, char **src)
        {
       -        if (!ec || ec != ec_glob) {
       +        if (!ec || (ec != ec_glob && ec != ec_exec)) {
                        while (**src && **src != '|' && **src != '\n')
                                *dst++ = *(*src)++;
                        *dst = '\0';
                        if (**src)
                                (*src)++;
       -        } else {        /* the rest of the line for :g */
       +        } else {        /* the rest of the line for :g and :! */
                        strcpy(dst, *src);
                        *src = strchr(*src, '\0');
                }