diff options
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 037598c85..c73938f5e 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -801,7 +801,7 @@ Fl_File_Chooser::fileNameCB() if (dirIsRelative) { fl_filename_absolute(pathname, sizeof(pathname), filename); value(pathname); - fileName->mark(fileName->position()); // no selection after expansion + fileName->mark(fileName->insert_position()); // no selection after expansion } else if (filename != pathname) { // Finally, make sure that we have a writable copy... strlcpy(pathname, filename, sizeof(pathname)); @@ -848,7 +848,7 @@ Fl_File_Chooser::fileNameCB() int condition = Fl::system_driver()->case_insensitive_filenames() ? strcasecmp(pathname, directory_) : strcmp(pathname, directory_); if (condition && (pathname[0] || strcmp("/", directory_))) { - int p = fileName->position(); + int p = fileName->insert_position(); int m = fileName->mark(); directory(pathname); @@ -861,7 +861,7 @@ Fl_File_Chooser::fileNameCB() strlcpy(pathname, tempname, sizeof(pathname)); } - fileName->position(p, m); + fileName->insert_position(p, m); } // Other key pressed - do filename completion as possible... @@ -922,7 +922,7 @@ Fl_File_Chooser::fileNameCB() // Highlight it with the cursor at the end of the selection so // s/he can press the right arrow to accept the selection // (Tab and End also do this for both cases.) - fileName->position( + fileName->insert_position( (int) (filename - pathname + max_match), (int) (filename - pathname + min_match)); } else if (max_match == 0) { @@ -1527,7 +1527,7 @@ Fl_File_Chooser::value(const char *filename) if (slash > pathname) slash[-1] = '/'; fileName->value(pathname); - fileName->position(0, (int) strlen(pathname)); + fileName->insert_position(0, (int) strlen(pathname)); okButton->activate(); // Then find the file in the file list and select it... |
