NonCodePatterns_EndsWith
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
! From a user (novice) point of view, how does it look like?
|
||||
|
||||
- Make a fuzzy command !> grep and fuzzy over it??? (doesn't seem very useful for grep)
|
||||
- OpenCode :Set CodeExcludePatterns ".git/|mk
|
||||
- ClangFormatOnCCode variable
|
||||
- CleanTrailingWhitespace
|
||||
|
||||
- Make all the keybinding / hook parsing initialize at the start to reduce runtime problems
|
||||
- Initialize all keybindings at the start and refer using global variables?
|
||||
- RegisterCommand should_appear_in_listing variable
|
||||
- Maybe one list for all variables including the commands etc?
|
||||
- Problem generating configs don't know which quotation marks would be good ....
|
||||
|
||||
@@ -690,13 +690,13 @@ String CodeSkipPatterns[] = {".git/", ".obj", ".o", ".pdb", ".exe", "SDL/", ".il
|
||||
String Coro_OpenCodeDir;
|
||||
|
||||
void Coro_OpenCode(mco_coro *co) {
|
||||
Array<String> patterns = Split(CoCurr->arena, NonCodePatterns_EndsWith, "|");
|
||||
Array<String> dirs = {CoCurr->arena};
|
||||
Add(&dirs, Coro_OpenCodeDir);
|
||||
for (int diri = 0; diri < dirs.len; diri += 1) {
|
||||
for (FileIter it = IterateFiles(CoCurr->arena, dirs[diri]); IsValid(it); Advance(&it)) {
|
||||
bool match = false;
|
||||
for (int endings_i = 0; endings_i < Lengthof(CodeSkipPatterns); endings_i += 1) {
|
||||
String ending = CodeSkipPatterns[endings_i];
|
||||
ForItem (ending, patterns) {
|
||||
if (EndsWith(it.absolute_path, ending)) {
|
||||
match = true;
|
||||
break;
|
||||
@@ -1394,6 +1394,7 @@ void EvalCommandsLineByLine(BSet set) {
|
||||
WindowID save_last = LastActiveLayoutWindowID;
|
||||
WindowID save_active = ActiveWindowID;
|
||||
WindowID save_next = NextActiveWindowID;
|
||||
Caret save_caret = set.view->carets[0];
|
||||
ActiveWindowID = set.window->id;
|
||||
LastActiveLayoutWindowID = set.window->id;
|
||||
NextActiveWindowID = set.window->id;
|
||||
@@ -1411,6 +1412,7 @@ void EvalCommandsLineByLine(BSet set) {
|
||||
}
|
||||
Open(string);
|
||||
}
|
||||
set.view->carets[0] = save_caret;
|
||||
LastActiveLayoutWindowID = save_last;
|
||||
ActiveWindowID = save_active;
|
||||
NextActiveWindowID = save_next;
|
||||
|
||||
@@ -160,3 +160,4 @@ RegisterVariable(String, VCVarsall, "C:/Program Files/Microsoft Visual Studio/20
|
||||
RegisterVariable(Float, UndoMergeTime, 0.3);
|
||||
RegisterVariable(Float, JumpHistoryMergeTime, 0.3);
|
||||
RegisterVariable(String, InternetBrowser, "firefox");
|
||||
RegisterVariable(String, NonCodePatterns_EndsWith, ".git/|.obj|.o|.pdb|.exe|.ilk|.ttf|.ico|.gif|.jpg|.png|.spall");
|
||||
|
||||
Reference in New Issue
Block a user