9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Boyd Roberts boyd@france3.fr
Subject: /appl/lib/wmlib.b [inferno]
Date: Mon, 23 Sep 1996 11:00:40 +0200	[thread overview]
Message-ID: <19960923090040.GjujDW8b2FGO7Qn5LLTiIm8S6bWQBmnj8yS6WnnnJKE@z> (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.




                 reply	other threads:[~1996-09-23  9:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19960923090040.GjujDW8b2FGO7Qn5LLTiIm8S6bWQBmnj8yS6WnnnJKE@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).