mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 14:58:08 +00:00
fix incorrect restriction of value committing in watch views; only commit value if initial value of edited text was unchanged
This commit is contained in:
@@ -1738,6 +1738,9 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
// rjf: commit edited cell string
|
||||
Vec2S64 tbl = v2s64(x, y);
|
||||
RD_WatchViewColumn *col = rd_watch_view_column_from_x(ewv, x);
|
||||
String8 initial_string = str8(edit_state->initial_buffer, edit_state->initial_size);;
|
||||
if(!str8_match(new_string, initial_string, 0))
|
||||
{
|
||||
switch(col->kind)
|
||||
{
|
||||
default:{}break;
|
||||
@@ -1779,7 +1782,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
}
|
||||
else if(evt->slot != UI_EventActionSlot_Cancel)
|
||||
{
|
||||
should_commit_asap = 0;
|
||||
should_commit_asap = editing_complete;
|
||||
}
|
||||
if(should_commit_asap)
|
||||
{
|
||||
@@ -1822,6 +1825,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(editing_complete)
|
||||
{
|
||||
ewv->text_editing = 0;
|
||||
|
||||
Reference in New Issue
Block a user