Compare commits
2 Commits
9d60b110f5
...
372287f557
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
372287f557 | ||
|
|
8ecfc82d8f |
@@ -9,11 +9,6 @@ void SetProjectDirectory(String dir) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMD_SetProjectDirectoryHere() {
|
|
||||||
BSet main = GetBSet(PrimaryWindowID);
|
|
||||||
SetProjectDirectory(GetDirectory(main.buffer));
|
|
||||||
} RegisterCommand(CMD_SetProjectDirectoryHere, "", "Sets work directory to the directory of the current buffer, it also renames couple special buffers to make them accomodate the new ProjectDirectory");
|
|
||||||
|
|
||||||
void CO_OpenCode(mco_coro *co) {
|
void CO_OpenCode(mco_coro *co) {
|
||||||
Array<String> patterns = SplitWhitespace(CoCurr->arena, OpenCodePatterns);
|
Array<String> patterns = SplitWhitespace(CoCurr->arena, OpenCodePatterns);
|
||||||
Array<String> exclude_patterns = SplitWhitespace(CoCurr->arena, OpenCodeExcludePatterns);
|
Array<String> exclude_patterns = SplitWhitespace(CoCurr->arena, OpenCodeExcludePatterns);
|
||||||
@@ -59,3 +54,17 @@ void CO_OpenCode(mco_coro *co) {
|
|||||||
"Open all code files in current ProjectDirectory, the code files are determined through NonCodePatterns_EndsWith config variable list",
|
"Open all code files in current ProjectDirectory, the code files are determined through NonCodePatterns_EndsWith config variable list",
|
||||||
data->dont_wait_until_resolved = true;
|
data->dont_wait_until_resolved = true;
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void CMD_SetProjectHere() {
|
||||||
|
BSet main = GetBSet(PrimaryWindowID);
|
||||||
|
String directory = GetDirectory(main.buffer);
|
||||||
|
SetProjectDirectory(directory);
|
||||||
|
#if PLUGIN_CONFIG
|
||||||
|
Scratch scratch;
|
||||||
|
for (FileIter it = IterateFiles(scratch, directory); IsValid(it); Advance(&it)) {
|
||||||
|
if (EndsWith(it.filename, "project.te")) {
|
||||||
|
LoadConfig(it.absolute_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} RegisterCommand(CMD_SetProjectHere, "", "Sets the project directory, opens the project file etc.");
|
||||||
@@ -2116,6 +2116,15 @@ bool RDBG_InitConnection(mco_coro *co) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file.len == 0) {
|
||||||
|
Scratch scratch;
|
||||||
|
for (FileIter it = IterateFiles(scratch, ProjectDirectory); IsValid(it); Advance(&it)) {
|
||||||
|
if (EndsWith(it.filename, ".rdbg")) {
|
||||||
|
file = Intern(&GlobalInternTable, it.absolute_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (file.len == 0) {
|
if (file.len == 0) {
|
||||||
file = QueryUserFile(co);
|
file = QueryUserFile(co);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user