do not add newline to selection text if next line not selected (Nick) - st - Simple Terminal
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit a047431d34aa77ac7a8fab08151fb569bbe2148e
 (DIR) parent fe724836866d16a6dfd6de3ca3664033d9146a54
 (HTM) Author: pancake@nopcode.org <unknown>
       Date:   Fri,  1 Apr 2011 09:35:38 +0200
       
       do not add newline to selection text if next line not selected (Nick)
       
       Diffstat:
         st.c                                |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/st.c b/st.c
       @@ -420,8 +420,8 @@ selcopy(void) {
                                                memcpy(ptr, term.line[y][x].c, sl);
                                                ptr += sl;
                                        }
       -                        if(ls)
       -                                *ptr = '\n', ptr++;
       +                        if(ls && y < sel.e.y)
       +                                *ptr++ = '\n';
                        }
                        *ptr = 0;
                }