Show dirty buffer in status window

This commit is contained in:
Krzosa Karol
2025-12-30 18:23:34 +01:00
parent e5a028ff93
commit beaf072740
4 changed files with 7 additions and 3 deletions

View File

@@ -2,6 +2,10 @@
! From a user (novice) point of view, how does it look like? ! From a user (novice) point of view, how does it look like?
Use session 3:
- Maybe status view, commit changes (like to buffer name or line) on enter?
- Search over buffer directory, close search, quick enter buffer? Not sure if line, more general purpose
How to go about search/replace, opening code and other considerations How to go about search/replace, opening code and other considerations
- We can use sed + find to search and replace, the automatic reopen should do the job - We can use sed + find to search and replace, the automatic reopen should do the job
- Maybe also we can List all files recursively instead of opening them, how fast is that??? - Maybe also we can List all files recursively instead of opening them, how fast is that???

View File

@@ -763,7 +763,6 @@ void Command_Rename() {
String Coro_YesNoCancel(mco_coro *co, BSet main, String question) { String Coro_YesNoCancel(mco_coro *co, BSet main, String question) {
JumpTempBuffer(&main); JumpTempBuffer(&main);
NextActiveWindowID = main.window->id; NextActiveWindowID = main.window->id;
RawAppendf(main.buffer, R"==( RawAppendf(main.buffer, R"==(
%S %S

View File

@@ -78,7 +78,8 @@ void StatusWindowUpdate() {
const char *reopen = main.buffer->changed_on_disk ? " :Reopen" : ""; const char *reopen = main.buffer->changed_on_disk ? " :Reopen" : "";
const char *case_sens = SearchCaseSensitive ? " C" : ""; const char *case_sens = SearchCaseSensitive ? " C" : "";
const char *word_bound = SearchWordBoundary ? " W" : ""; const char *word_bound = SearchWordBoundary ? " W" : "";
String s = Format(scratch, " %S:%lld:%lld%s%s", main.buffer->name, (long long)xy.line + 1ll, (long long)xy.col + 1ll, case_sens, word_bound, reopen); const char *dirty = main.buffer->dirty ? " !" : "";
String s = Format(scratch, " %S:%lld:%lld%s%s%s", main.buffer->name, (long long)xy.line + 1ll, (long long)xy.col + 1ll, dirty, case_sens, word_bound, reopen);
For (ActiveProcesses) { For (ActiveProcesses) {
if (it.view_id == main.view->id.id) { if (it.view_id == main.view->id.id) {
s = Format(scratch, "%S %lld :KillProcess", s, (long long)it.id); s = Format(scratch, "%S %lld :KillProcess", s, (long long)it.id);