scroll output to bottom by default (not yet configurable)

This commit is contained in:
Ryan Fleury
2024-10-07 17:45:57 -07:00
parent 534a727b7c
commit 3720634a62
2 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -1193,7 +1193,7 @@ internal void
os_window_set_minimized(OS_Handle handle, B32 minimized)
{
OS_W32_Window *window = os_w32_window_from_handle(handle);
if(window != 0)
if(window != 0 && minimized != os_window_is_minimized(handle))
{
switch(minimized)
{
+19 -1
View File
@@ -6370,9 +6370,17 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(disasm)
////////////////////////////////
//~ rjf: output @view_hook_impl
typedef struct RD_OutputViewState RD_OutputViewState;
struct RD_OutputViewState
{
U128 last_hash;
RD_CodeViewState cv;
};
RD_VIEW_RULE_UI_FUNCTION_DEF(output)
{
RD_CodeViewState *cv = rd_view_state(RD_CodeViewState);
RD_OutputViewState *ov = rd_view_state(RD_OutputViewState);
RD_CodeViewState *cv = &ov->cv;
rd_code_view_init(cv);
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
@@ -6410,6 +6418,16 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(output)
info.lines_ranges = &empty_range;
}
//////////////////////////////
//- rjf: scroll-to-bottom
//
if(!u128_match(hash, ov->last_hash))
{
ov->last_hash = hash;
cv->goto_line_num = info.lines_count;
cv->contain_cursor= 1;
}
//////////////////////////////
//- rjf: build code contents
//