mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-15 00:22:23 -07:00
scroll output to bottom by default (not yet configurable)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user