Rename to Config, Fix slowness of ShowCommands and improve quality
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user