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");
|
||||
|
||||
void AddCommand(Array<Command> *arr, String name, String binding, CMDFunction *function) {
|
||||
IterRemove(*arr) {
|
||||
IterRemovePrepare(*arr);
|
||||
if (it.name == name) {
|
||||
remove_item = true;
|
||||
}
|
||||
}
|
||||
Command cmd = {};
|
||||
cmd.name = name;
|
||||
cmd.binding = binding;
|
||||
|
||||
@@ -91,9 +91,9 @@ void CMD_SearchOpenBuffers() {
|
||||
Open(string);
|
||||
});
|
||||
view->update_hook = UpdateSearchOpenBuffersView;
|
||||
SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0));
|
||||
if (string.len) {
|
||||
SelectRange(view, GetLineRangeWithoutNL(search_project_buffer, 0));
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user