tfixed string cutting - dmenu - Dmenu fork with xft fonts.
 (HTM) git clone git://r-36.net/dmenu
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6a26e97f741d732a68a978bbcde4331a6a1610c2
 (DIR) parent 0e21ef5f3701cafb9936b5fcbfc204bc477cb215
 (HTM) Author: Anselm R.Garbe <arg@10ksloc.org>
       Date:   Mon, 14 Aug 2006 10:56:57 +0200
       
       fixed string cutting
       
       Diffstat:
         draw.c                              |      10 +++++-----
       
       1 file changed, 5 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/draw.c b/draw.c
       t@@ -70,12 +70,12 @@ drawtext(const char *text, Bool invert, Bool border)
                while(len && (w = textnw(buf, len)) > dc.w - h)
                        buf[--len] = 0;
                if(len < olen) {
       +                if(len > 1)
       +                        buf[len - 1] = '.';
       +                if(len > 2)
       +                        buf[len - 2] = '.';
                        if(len > 3)
       -                        memcpy(buf + len - 4, "...\0", 4);
       -                else if(len > 2)
       -                        memcpy(buf + len - 3, "..\0", 3);
       -                else if(len > 1)
       -                        memcpy(buf + len - 2, ".\0", 2);
       +                        buf[len - 3] = '.';
                }
        
                if(w > dc.w)