mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 01:20:55 +01:00
InputText: Fix handling of paste failure (buffer full) which in some cases could corrupt the undo stack. (#4038)
This commit is contained in:
parent
327a5d8253
commit
d9b606672a
@ -121,6 +121,8 @@ Other Changes:
|
|||||||
consistent with the compile-time default. (#3922)
|
consistent with the compile-time default. (#3922)
|
||||||
- DragScalar: Add default value for v_speed argument to match higher-level functions. (#3922) [@eliasdaler]
|
- DragScalar: Add default value for v_speed argument to match higher-level functions. (#3922) [@eliasdaler]
|
||||||
- ColorEdit4: Alpha default to 255 (instead of 0) when omitted in hex input. (#3973) [@squadack]
|
- ColorEdit4: Alpha default to 255 (instead of 0) when omitted in hex input. (#3973) [@squadack]
|
||||||
|
- InputText: Fix handling of paste failure (buffer full) which in some cases could corrupt the undo stack. (#4038)
|
||||||
|
(fix submitted to https://github.com/nothings/stb/pull/1158) [@Unit2Ed, @ocornut]
|
||||||
- InputText: Do not filter private unicode codepoints (e.g. icons) when pasted from clipboard. (#4005) [@dougbinks]
|
- InputText: Do not filter private unicode codepoints (e.g. icons) when pasted from clipboard. (#4005) [@dougbinks]
|
||||||
- InputText: Align caret/cursor to pixel coordinates. (#4080) [@elvissteinjr]
|
- InputText: Align caret/cursor to pixel coordinates. (#4080) [@elvissteinjr]
|
||||||
- InputText: Fixed CTRL+Arrow or OSX double-click leaking the presence of spaces when ImGuiInputTextFlags_Password
|
- InputText: Fixed CTRL+Arrow or OSX double-click leaking the presence of spaces when ImGuiInputTextFlags_Password
|
||||||
|
@ -716,9 +716,11 @@ static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING *str, STB_TexteditSta
|
|||||||
state->has_preferred_x = 0;
|
state->has_preferred_x = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// remove the undo since we didn't actually insert the characters
|
// [DEAR IMGUI]
|
||||||
if (state->undostate.undo_point)
|
//// remove the undo since we didn't actually insert the characters
|
||||||
--state->undostate.undo_point;
|
//if (state->undostate.undo_point)
|
||||||
|
// --state->undostate.undo_point;
|
||||||
|
// note: paste failure will leave deleted selection, may be restored with an undo (see https://github.com/nothings/stb/issues/734 for details)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user