Fix ctrl-shift-f and AddCommand bugs
This commit is contained in:
@@ -536,6 +536,12 @@ void CMD_KillProcess() {
|
|||||||
} RegisterCommand(CMD_KillProcess, "", "Kill process in the last active primary window");
|
} RegisterCommand(CMD_KillProcess, "", "Kill process in the last active primary window");
|
||||||
|
|
||||||
void AddCommand(Array<Command> *arr, String name, String binding, CMDFunction *function) {
|
void AddCommand(Array<Command> *arr, String name, String binding, CMDFunction *function) {
|
||||||
|
IterRemove(*arr) {
|
||||||
|
IterRemovePrepare(*arr);
|
||||||
|
if (it.name == name) {
|
||||||
|
remove_item = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Command cmd = {};
|
Command cmd = {};
|
||||||
cmd.name = name;
|
cmd.name = name;
|
||||||
cmd.binding = binding;
|
cmd.binding = binding;
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ void CMD_SearchOpenBuffers() {
|
|||||||
Open(string);
|
Open(string);
|
||||||
});
|
});
|
||||||
view->update_hook = UpdateSearchOpenBuffersView;
|
view->update_hook = UpdateSearchOpenBuffersView;
|
||||||
SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0));
|
|
||||||
if (string.len) {
|
if (string.len) {
|
||||||
|
SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0));
|
||||||
Replace(view, string);
|
Replace(view, string);
|
||||||
SelectEntireBuffer(view);
|
|
||||||
}
|
}
|
||||||
|
SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0));
|
||||||
} RegisterCommand(CMD_SearchOpenBuffers, "ctrl-shift-f", "Interactive search over the entire project in a new buffer view");
|
} RegisterCommand(CMD_SearchOpenBuffers, "ctrl-shift-f", "Interactive search over the entire project in a new buffer view");
|
||||||
|
|||||||
Reference in New Issue
Block a user