Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
Other
9.06k stars 542 forks source link

Possible Bug in nuclear_edit Clipboard Copy #514

Closed jmwright closed 1 year ago

jmwright commented 1 year ago

I was not able to find an issue for this. In nuclear_edit.c here, clip->copy is checked, but I think it should be checking the copy variable from a few lines above. This would be consistent with the way the cut variable is used here (directly below the copy line) as well.

I can open a PR with the fix, but I wanted to make sure I wasn't missing something simple first.

revolucas commented 1 year ago

I believe it's intentional. If this was changed to if (copy) then cut functionality would break. It's not supposed to be if (copy) else if (cut). It should copy on both occasions, cut just has an extra step where it deletes the text in the edit box.

jmwright commented 1 year ago

Thanks