mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-15 20:52:35 +00:00
Fix crash when EditLine receives a paste from clipboard
This commit is contained in:
@@ -126,9 +126,9 @@ module CyberarmEngine
|
|||||||
|
|
||||||
when Gosu::KB_V
|
when Gosu::KB_V
|
||||||
if instance_of?(EditLine) # EditLine assumes a single line of text
|
if instance_of?(EditLine) # EditLine assumes a single line of text
|
||||||
@text_input.insert_text(Gosu.clipboard.encode("UTF-8").gsub("\n", ""))
|
@text_input.insert_text(Gosu.clipboard.gsub("\n", ""))
|
||||||
else
|
else
|
||||||
@text_input.insert_text(Gosu.clipboard.encode("UTF-8"))
|
@text_input.insert_text(Gosu.clipboard)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user