about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-12-07 01:08:09 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-12-07 01:08:09 -0800
commit366d806515a724d2ad46900de235e42349d181d0 (patch)
tree05499e20d471d62947254563e80e60a852f9a7ee
parentc4333b8da5db1c0daf6aa2e1f2e06da1efb3c707 (diff)
downloadtext.love-366d806515a724d2ad46900de235e42349d181d0.tar.gz
copy correct warning message
Not really useful here, but other forks might make use of it.
-rw-r--r--main.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index cf76a19..82a8f2d 100644
--- a/main.lua
+++ b/main.lua
@@ -219,7 +219,7 @@ function App.keychord_press(chord, key)
   Skip_rest_of_key_events = nil
   if current_app_is_warning() then
     if chord == 'C-c' then
-      love.system.setClipboardText(Error_message)
+      love.system.setClipboardText(warning_message())
     else
       clear_warning()
       Skip_rest_of_key_events = true
@@ -367,3 +367,8 @@ function clear_warning()
   assert(type(Current_app) == 'table')
   Current_app = Current_app.next_app
 end
+
+function warning_message()
+  assert(type(Current_app) == 'table')
+  return Current_app.message
+end