Don't show special buffers, misc

This commit is contained in:
krzosa
2025-12-22 17:54:33 +01:00
parent af1d88b07c
commit 05652240f1
6 changed files with 31 additions and 32 deletions

View File

@@ -75,6 +75,24 @@ void Command_ShowCommands() {
SelectRange(command_bar.view, GetBufferEndAsRange(command_bar.buffer));
} RegisterCommand(Command_ShowCommands, "ctrl-shift-p");
void Command_ShowDebugBufferList() {
if (ActiveWindowID == CommandBarWindowID && LastExecutedCommand == Command_ShowDebugBufferList) {
ActiveWindowID = LastActiveLayoutWindowID;
return;
}
BSet command_bar = GetBSet(CommandBarWindowID);
command_bar.window->visible = true;
command_bar.window->eval_command = false;
ActiveWindowID = command_bar.window->id;
ResetBuffer(command_bar.buffer);
For(Buffers) {
RawAppendf(command_bar.buffer, "%-80S || %S\n", SkipToLastSlash(it->name), it->name);
}
command_bar.view->update_scroll = true;
SelectRange(command_bar.view, GetBufferEndAsRange(command_bar.buffer));
} RegisterCommand(Command_ShowDebugBufferList, "");
void Command_ShowBufferList() {
if (ActiveWindowID == CommandBarWindowID && LastExecutedCommand == Command_ShowBufferList) {
ActiveWindowID = LastActiveLayoutWindowID;
@@ -87,6 +105,9 @@ void Command_ShowBufferList() {
ActiveWindowID = command_bar.window->id;
ResetBuffer(command_bar.buffer);
For(Buffers) {
if (it->special) {
continue;
}
RawAppendf(command_bar.buffer, "%-80S || %S\n", SkipToLastSlash(it->name), it->name);
}
command_bar.view->update_scroll = true;