fix path completion in Mac OS X file dialog
svn: r5642
This commit is contained in:
parent
3b10623bad
commit
c0bd2049a9
|
@ -3382,6 +3382,9 @@ int scheme_is_complete_path(const char *s, long len, int kind)
|
|||
if (!len)
|
||||
return 0;
|
||||
|
||||
if (!kind)
|
||||
kind = SCHEME_PLATFORM_PATH_KIND;
|
||||
|
||||
if (!scheme_is_relative_path(s, len, kind)) {
|
||||
if (kind == SCHEME_WINDOWS_PATH_KIND) {
|
||||
if (IS_A_DOS_SEP(s[0]) && IS_A_DOS_SEP(s[1])) {
|
||||
|
|
|
@ -258,7 +258,7 @@ extern "C" {
|
|||
#endif
|
||||
extern "C" {
|
||||
extern char *scheme_expand_filename(char* filename, int ilen, const char *errorin, int *ex, int guards);
|
||||
extern int scheme_is_complete_path(const char *s, long len);
|
||||
extern int scheme_is_complete_path(const char *s, long len, int kind);
|
||||
extern int scheme_file_exists(const char *s);
|
||||
extern char *scheme_find_completion(char *fn);
|
||||
}
|
||||
|
@ -406,10 +406,11 @@ static OSStatus tab_evt_handler(EventHandlerCallRef inHandlerCallRef,
|
|||
result = extract_string(ccbi);
|
||||
len = strlen(result);
|
||||
|
||||
if (scheme_is_complete_path(result, len)) {
|
||||
if (scheme_is_complete_path(result, len, 0)) {
|
||||
result = scheme_find_completion(result);
|
||||
} else
|
||||
} else {
|
||||
result = NULL;
|
||||
}
|
||||
|
||||
if (result) {
|
||||
CFStringRef str;
|
||||
|
|
Loading…
Reference in New Issue
Block a user