Compare commits
3 Commits
5b50a49416
...
bbab59fa0a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbab59fa0a | ||
|
|
6cf9731959 | ||
|
|
c4b4460cbd |
@@ -2,8 +2,11 @@
|
|||||||
! From a user (novice) point of view, how does it look like?
|
! 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)
|
- 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
|
- RegisterCommand should_appear_in_listing variable
|
||||||
- Maybe one list for all variables including the commands etc?
|
- Maybe one list for all variables including the commands etc?
|
||||||
- Problem generating configs don't know which quotation marks would be good ....
|
- 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;
|
String Coro_OpenCodeDir;
|
||||||
|
|
||||||
void Coro_OpenCode(mco_coro *co) {
|
void Coro_OpenCode(mco_coro *co) {
|
||||||
|
Array<String> patterns = Split(CoCurr->arena, NonCodePatterns_EndsWith, "|");
|
||||||
Array<String> dirs = {CoCurr->arena};
|
Array<String> dirs = {CoCurr->arena};
|
||||||
Add(&dirs, Coro_OpenCodeDir);
|
Add(&dirs, Coro_OpenCodeDir);
|
||||||
for (int diri = 0; diri < dirs.len; diri += 1) {
|
for (int diri = 0; diri < dirs.len; diri += 1) {
|
||||||
for (FileIter it = IterateFiles(CoCurr->arena, dirs[diri]); IsValid(it); Advance(&it)) {
|
for (FileIter it = IterateFiles(CoCurr->arena, dirs[diri]); IsValid(it); Advance(&it)) {
|
||||||
bool match = false;
|
bool match = false;
|
||||||
for (int endings_i = 0; endings_i < Lengthof(CodeSkipPatterns); endings_i += 1) {
|
ForItem (ending, patterns) {
|
||||||
String ending = CodeSkipPatterns[endings_i];
|
|
||||||
if (EndsWith(it.absolute_path, ending)) {
|
if (EndsWith(it.absolute_path, ending)) {
|
||||||
match = true;
|
match = true;
|
||||||
break;
|
break;
|
||||||
@@ -1394,6 +1394,7 @@ void EvalCommandsLineByLine(BSet set) {
|
|||||||
WindowID save_last = LastActiveLayoutWindowID;
|
WindowID save_last = LastActiveLayoutWindowID;
|
||||||
WindowID save_active = ActiveWindowID;
|
WindowID save_active = ActiveWindowID;
|
||||||
WindowID save_next = NextActiveWindowID;
|
WindowID save_next = NextActiveWindowID;
|
||||||
|
Caret save_caret = set.view->carets[0];
|
||||||
ActiveWindowID = set.window->id;
|
ActiveWindowID = set.window->id;
|
||||||
LastActiveLayoutWindowID = set.window->id;
|
LastActiveLayoutWindowID = set.window->id;
|
||||||
NextActiveWindowID = set.window->id;
|
NextActiveWindowID = set.window->id;
|
||||||
@@ -1411,6 +1412,7 @@ void EvalCommandsLineByLine(BSet set) {
|
|||||||
}
|
}
|
||||||
Open(string);
|
Open(string);
|
||||||
}
|
}
|
||||||
|
set.view->carets[0] = save_caret;
|
||||||
LastActiveLayoutWindowID = save_last;
|
LastActiveLayoutWindowID = save_last;
|
||||||
ActiveWindowID = save_active;
|
ActiveWindowID = save_active;
|
||||||
NextActiveWindowID = save_next;
|
NextActiveWindowID = save_next;
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ WindowID DocumentSelected = {-1};
|
|||||||
WindowID ResizerSelected = {-1};
|
WindowID ResizerSelected = {-1};
|
||||||
WindowID ResizerHover = {-1};
|
WindowID ResizerHover = {-1};
|
||||||
Caret DocumentAnchor;
|
Caret DocumentAnchor;
|
||||||
|
Vec2I MouseMiddleAnchor;
|
||||||
|
|
||||||
Buffer *GCInfoBuffer;
|
Buffer *GCInfoBuffer;
|
||||||
Buffer *EventBuffer;
|
Buffer *EventBuffer;
|
||||||
@@ -159,3 +160,4 @@ RegisterVariable(String, VCVarsall, "C:/Program Files/Microsoft Visual Studio/20
|
|||||||
RegisterVariable(Float, UndoMergeTime, 0.3);
|
RegisterVariable(Float, UndoMergeTime, 0.3);
|
||||||
RegisterVariable(Float, JumpHistoryMergeTime, 0.3);
|
RegisterVariable(Float, JumpHistoryMergeTime, 0.3);
|
||||||
RegisterVariable(String, InternetBrowser, "firefox");
|
RegisterVariable(String, InternetBrowser, "firefox");
|
||||||
|
RegisterVariable(String, NonCodePatterns_EndsWith, ".git/|.obj|.o|.pdb|.exe|.ilk|.ttf|.ico|.gif|.jpg|.png|.spall");
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ void SetMouseCursor(SDL_SystemCursor id) {
|
|||||||
JS_SetMouseCursor("default");
|
JS_SetMouseCursor("default");
|
||||||
} else if (id == SDL_SYSTEM_CURSOR_TEXT) {
|
} else if (id == SDL_SYSTEM_CURSOR_TEXT) {
|
||||||
JS_SetMouseCursor("text");
|
JS_SetMouseCursor("text");
|
||||||
|
} else if (id == SDL_SYSTEM_CURSOR_MOVE) {
|
||||||
|
JS_SetMouseCursor("all-scroll");
|
||||||
} else {
|
} else {
|
||||||
InvalidCodepath();
|
InvalidCodepath();
|
||||||
}
|
}
|
||||||
@@ -104,6 +106,11 @@ void SetMouseCursor(Event event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MouseMiddleAnchor.x != 0 && MouseMiddleAnchor.y != 0) {
|
||||||
|
SetMouseCursor(SDL_SYSTEM_CURSOR_MOVE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
For(order) {
|
For(order) {
|
||||||
if (!it->visible) continue;
|
if (!it->visible) continue;
|
||||||
bool mouse_in_total = AreOverlapping(mouse, it->total_rect);
|
bool mouse_in_total = AreOverlapping(mouse, it->total_rect);
|
||||||
@@ -315,6 +322,20 @@ void OnCommand(Event event) {
|
|||||||
MouseLoadWord(event);
|
MouseLoadWord(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Vec2I mouse = MouseVec2I();
|
||||||
|
if (Mouse(MIDDLE)) {
|
||||||
|
MouseMiddleAnchor = mouse;
|
||||||
|
} else if (Mouse(MIDDLE_UP)) {
|
||||||
|
MouseMiddleAnchor = {0, 0};
|
||||||
|
}
|
||||||
|
if (MouseMiddleAnchor.x != 0) {
|
||||||
|
BSet active = GetBSet(ActiveWindowID);
|
||||||
|
active.view->scroll += mouse - MouseMiddleAnchor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Ctrl() && Mouse(LEFT)) {
|
if (Ctrl() && Mouse(LEFT)) {
|
||||||
MouseLoadWord(event);
|
MouseLoadWord(event);
|
||||||
} else if (Mouse(LEFT)) { // Uses Alt and shift
|
} else if (Mouse(LEFT)) { // Uses Alt and shift
|
||||||
|
|||||||
@@ -121,7 +121,8 @@ void CMD_ShowBufferList() {
|
|||||||
ResetBuffer(command_bar.buffer);
|
ResetBuffer(command_bar.buffer);
|
||||||
For (Buffers) {
|
For (Buffers) {
|
||||||
if (it->special || it->temp) {
|
if (it->special || it->temp) {
|
||||||
if (it->id != NullBufferID) continue;
|
if (it->id != NullBufferID && it->id != BuildBufferID) continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
RawAppendf(command_bar.buffer, "\n%S", it->name);
|
RawAppendf(command_bar.buffer, "\n%S", it->name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user