Naming and fix CloseAll

This commit is contained in:
krzosa
2025-12-29 10:48:06 +01:00
parent 0f03f248c7
commit ccf55d6d74
7 changed files with 27 additions and 27 deletions

View File

@@ -90,19 +90,19 @@ void CommandWindowUpdate() {
active.view->prev_search_line = line_string;
Array<FuzzyPair> ratings = FuzzySearchLines(scratch, active.buffer, 1, active.buffer->line_starts.len, line_string);
Buffer *temp_buffer = CreateTempBuffer(scratch, active.buffer->cap);
RawAppend(temp_buffer, line_string);
Buffer *scratch_buff = CreateScratchBuffer(scratch, active.buffer->cap);
RawAppend(scratch_buff, line_string);
For(IterateInReverse(&ratings)) {
String16 s = GetLineStringWithoutNL(active.buffer, it.index);
if (s.len == 0) continue;
RawAppend(temp_buffer, u"\n");
RawAppend(temp_buffer, s);
RawAppend(scratch_buff, u"\n");
RawAppend(scratch_buff, s);
}
Caret caret = active.view->carets[0];
SaveCaretHistoryBeforeBeginEdit(active.buffer, active.view->carets);
SelectEntireBuffer(active.view);
Replace(active.view, GetString(temp_buffer));
Replace(active.view, GetString(scratch_buff));
active.view->carets[0] = caret;
}
}
@@ -160,7 +160,7 @@ void Command_ShowBufferList() {
NextActiveWindowID = command_bar.window->id;
ResetBuffer(command_bar.buffer);
For (Buffers) {
if (it->special || it->garbage) {
if (it->special || it->temp) {
continue;
}
RawAppendf(command_bar.buffer, "\n%S", it->name);