Author Topic: Current Directory  (Read 414 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1861
  • Hero Points: 179
  • Text
Current Directory
« on: September 06, 2018, 09:14:49 pm »
I have "Tools > Options > File Options > Open -> Set current dir when switching buffers" set.
Yet, I'm finding that Slick often doesn't have the CWD set to the current buffer.

I added this macro to track this:
Code: [Select]
_switchbuf_cd(...)
{
    say ("Notification p_buf_name: " p_buf_name " ext: " _bufname2ext( p_buf_name ) );
}

It just prints the buffer name of file being notified of the buffer switch.

After I do a FIF and have some search results Slick often get the CWD wrong.

I have a search result with 4 matching files, each in a different folder.
I double click 1st result in file 4: Correct CWD
    say Notification: ".search 8 ext: fundamental"
    say Notification: "C:\path\four\file4.txt"
    say Notification: "C:\path\four\file4.txt"
I double click 1st result in file 1: CWD is set to folder of 2nd file!
    say Notification: ".search 8 ext: fundamental"
    say Notification: "C:\path\one\file1.txt"
    say Notification: "C:\path\one\file1.txt"
    say Notification: "C:\path\two\file2.txt"

In other cases though, Slick seems to prefer to set the CWD to the 1st file.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4962
  • Hero Points: 409
Re: Current Directory
« Reply #1 on: September 07, 2018, 02:44:52 am »
I reproduced a problem (not sure what's going on yet). What is def_one_file set to? Mine is blank. I suspect yours is too.
« Last Edit: September 07, 2018, 03:04:30 am by Clark »