Bugs item #1908172, was opened at 2008-03-05 18:25
Message generated for change (Settings changed) made by ajbj
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1908172&group_id=11005

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Deleted
>Resolution: Duplicate
Priority: 5
Private: No
Submitted By: Tony Balinski (ajbj)
Assigned to: Nobody/Anonymous (nobody)
Summary: Empty $file_path

Initial Comment:
When you start NEdit without a particular file, you get a document labelled 
"Unknown". It is created without a file path, which can be a big problem if you 
execute macros from it using $file_name.

This is easy to fix in function EditNewFile() in file.c, where window->path is 
assigned:

strcpy(window->path, defaultPath ? defaultPath : "");

Instead of "", call GetCurrentDir() (in util/utils.c).
On Unix/Linux/Posix/Cygwin you'll need to add a "/" to that, since that's how 
file paths are normally terminated in NEdit. (On VMS, I expect this is not 
necessary, but I don't have such a system to play with. I don't know about 
other file path conventions on other systems.)

Having made the change results in a correctly assigned $file_path value for 
these documents. This path is visible in the statistics line (if you use that), 
another useful feature.

----------------------------------------------------------------------

>Comment By: Tony Balinski (ajbj)
Date: 2008-03-05 18:27

Message:
Logged In: YES 
user_id=618141
Originator: YES

Sorry for the duplicate!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1908172&group_id=11005
-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to