9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* /appl/lib/wmlib.b [inferno]
@ 1996-09-23  9:00 Boyd
  0 siblings, 0 replies; only message in thread
From: Boyd @ 1996-09-23  9:00 UTC (permalink / raw)


i've added a few lines to /appl/lib/wmlib.b so that getfilename tracks
the last directory where a file was opened.  passing "" for the
directory argument uses the previous directory where the file was
found.  if "" is passed on the first call "." is used.

226a227,228
> lastdir := "";
>
233a236,245
>
>       # start at  directory of previous file
>       if (dir == "")
>       {
>               if (lastdir != "")
>                       dir = lastdir;
>               else
>                       dir = ".";
>       }
>
346a359,360
>
>       lastdir = dir;

to exploit this i changed /appl/wm/edit.b:

18a19,21
> include "lib.m";
>       str: String;
>
69a73
>       str = load String String->PATH;
150c154
<               fname := wmlib->getfilename(screen, ed, "", "*", ".");
---
>               fname := wmlib->getfilename(screen, ed, "", "*", "");
268a273,274
>       (nil, f) := str->splitr(curfile, "/");
>       wmlib->taskbar(ed, f);

this patch also includes setting the taskbar to be the basename of the
file currently being edited.  i guess you could say i'm actually writing
limbo with edit.  i'd prefer sam, but i'm beginning to live with edit.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-09-23  9:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-23  9:00 /appl/lib/wmlib.b [inferno] Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).