jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Patch for %F in the statusline


Hi,

here is a patch from John Skilleter, which enables the %F in the statusline to display the filename of the currentbuffer. I modified it slightly, to also include parts of the path. I find it very usefull.

What's the recommended procedure, to get this into the next release ?


*** screen.c    Mon Mar  4 18:43:33 2002
--- screen.c.org        Mon Mar  4 18:40:26 2002
***************
*** 649,660 ****

 static void finish_status(int col_flag)
 {
! /*   char *v, ch; */
!    char *v, ch,*p,*pp;
    Line *l;
    int top, rows, narrows;
! /*   char buf [256]; */
!    char buf [512];
    char *str;

    v = CBuf->status_line;
--- 649,658 ----

 static void finish_status(int col_flag)
 {
!    char *v, ch;
    Line *l;
    int top, rows, narrows;
!    char buf [256];
    char *str;

    v = CBuf->status_line;
***************
*** 679,694 ****
if (CBuf->flags & ABBREV_MODE) str = " abbrev"; else str = NULL;
            break;
          case 'f': str = CBuf->file; break;
-          case 'F': /* [JMS] - Added %F for filename with full path*/
-            p = CBuf->dir;
-            while (strlen(p) >20)
-                {
-                   p = index(p,'/');
-                   *p++;
-                }
- sprintf(buf, "%s%s",p , CBuf->file); /* [JMS] Format the path & filename */
-            str=buf;   /* [JMS] Point the status pointer at it */
-            break;     /* [JMS] end of the %F modifications */
          case 'n':
            narrows = jed_count_narrows ();
            if (narrows)
--- 677,682 ----


Mit freundlichen Grüßen                              Joachim Schmitz
--------------------------------------------------------------------
AixtraWare Ingenieurbüro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163
--------------------------------------------------------------------
Key fingerprint = DA10 CC82 62F8 1DBB 39A1  1EDC 725B 3317 A8D7 C3A6
Keyserver: http://germany.keyserver.net/en/

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]