Open cblc opened 1 year ago
By the way, I believe that paths with spaces don't work either in Open Selected. Now that I say this, I suppose you apply Unicode normalization to file names and paths before opening files (because for example on MacOS I remember that only one normalization of Unicode works). I didn't experience any problems with this (I typed file names with accents, selected them, and the right files were opened), I'm just reminding that this can be relevant.
I can't reproduce this problem.
Example:
source/nedit.c
../util/misc.h
on line 53This opens the file misc.h without any problem.
Does this work on your system?
Now it works. I don't understand 😮 Maybe it's related to xnc: yesterday I created a Finder service so that I can select several files in Finder, press a keyboard shortcut, and open the selected files in XNEdit. I used xnc so that all selected files are opened in the same XNEdit window. Very nice feature, because it makes the need of drag and drop superfluous.
BTW, are you interested in this feature? I can explain to you how to do it if you don't know.
You can disregard the original claim: actually the relative path was wrong in the file that I was editing, so no wonder that it didn't work. Anyway, I think that filenames and paths with spaces don't work (for Open Selected, I mean). Do they work for you?
I can confirm that it doesn't work with spaces in file names. For some reason this is intentional, there is specific code to remove whitespace before trying to open the file.
The whole "Open Selected" feature is more complex than I thought. For example it can expand ~
to the home directory or it can understand C include syntax. I have to look into this a bit more before I can decide how to fix this.
No worries. You can give very, very low priority to this. At least for me, I never use files with whitespace for source code files, for obvious reasons. It just came out because I wanted to test how well the Open Selected feature behaved, but I think it's really powerful like it is. Maybe skipping whitespace had a purpose, perhaps being able to open several files separated by whitespace? I don't know.
The Open Selected option in the File menu works fine only when the file to be opened is in the same directory as the file being edited, or when the full path is specified. But if you have it with relative path (which can happen for some included files in source code), it doesn't work. At least on MacOS, but I assume this will be the case for all the systems. I think it would be a nice addition to have relative paths working.