On Wed, Oct 1, 2008 at 21:53, Tony Balinski <[EMAIL PROTECTED]> wrote:
> Quoting Bert Wesarg <[EMAIL PROTECTED]>:
>
>> On Wed, Oct 1, 2008 at 13:51, Bert Wesarg <[EMAIL PROTECTED]>
>> wrote:
>> >> Comment By: Bert Wesarg (lebert)
>> >> Date: 2008-10-01 13:19
>> >>
>> >> Message:
>> >> Ohh,
>> >>
>> >> I think we are not done with this bug:
>> >>
>> >> start nedit
>> >> modifie the Untitled buffer
>> >> close window without saving
>> >> -> Untitled without path
>> >
>> > Here is a small patch which does this by simply keeping the path from
>> > the window which is closed.
>> >
>> > It changes also UniqueUntitledName() so that we can use w->filename
>> in-place.
>> Did I really forgot the attachment?
> Heh! Happens to the best of us...
>
> An interesting construction in your patch:
> if (&w->filename[0] == name) {
> surely easier to write
> if (w->filename == name) {
> or is there some other motivation?
Yeah, it was intentional, I normally don't write such code. But I had
the feeling that your easy way could lead to compiler warnings/errors
with old compilers.
>
> By the way, good catch on this dropped path business. I am not sure, but I
> think I would restore the original PWD to the remaining window. Hmmm...
Probably the better way, at least it has a better semantic.
> As for temporary untitleds, you could argue that each directory could have its
> own sequence.
If this statement has to do with ~Untitled in the HOME dir, I don't
understand it.
>
> One thing I did with an earlier version of nedit (pre tabs) was to provide a
> way of naming a new document at its creation. Brilliant for a temporary file
> showing the result of some command, like a diff merge or man output: your
> windows get named appropriately. Since new() started taking parameters, I
> never had the courage to re-implement this. Curiously it's somewhat like
> starting nedit with an inexistant file name, but you can't do that once nedit
> is started! Saving caused Save As... to pop up, with as much of the name as
> would be legal(ish) - no wildcards, slashes, spaces etc - can't remember the
> details. Useful for Thorsten's "transients" perhaps?
Sounds reasonable. Will put this somewhere in a todo list ;-)
BTW: I have the feeling that someone had a patch to change the cwd for
nedit/window/buffer. Any idea if this exists?
Bert
>
> Tony
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop