Rename to Config, Fix slowness of ShowCommands and improve quality

This commit is contained in:
krzosa
2025-12-21 22:26:15 +01:00
parent 79d709d391
commit 725cdde007
10 changed files with 46 additions and 33 deletions

View File

@@ -55,19 +55,29 @@ void CommandWindowUpdate() {
}
void Command_ShowCommands() {
if (ActiveWindowID == CommandBarWindowID && LastExecutedCommand == Command_ShowCommands) {
ActiveWindowID = LastActiveLayoutWindowID;
return;
}
BSet command_bar = GetBSet(CommandBarWindowID);
command_bar.window->visible = true;
command_bar.window->eval_command = true;
ActiveWindowID = command_bar.window->id;
ResetBuffer(command_bar.buffer);
For(CommandFunctions) {
Appendf(command_bar.view, "%S\n", it.name);
RawAppendf(command_bar.buffer, "%S\n", it.name);
}
command_bar.view->update_scroll = true;
SelectRange(command_bar.view, GetBufferEndAsRange(command_bar.buffer));
} RegisterCommand(Command_ShowCommands, "ctrl-shift-p");
void Command_ShowBufferList() {
if (ActiveWindowID == CommandBarWindowID && LastExecutedCommand == Command_ShowBufferList) {
ActiveWindowID = LastActiveLayoutWindowID;
return;
}
BSet command_bar = GetBSet(CommandBarWindowID);
command_bar.window->visible = true;
command_bar.window->eval_command = false;