about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-19 09:21:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-19 09:21:32 -0700
commit3ffc2ed8f32237969fb202f89200df01e7fbdbc8 (patch)
treeaf796fb781a10f436ac690fccef8f84fa72eae15 /text.lua
parent703ed905c13a837c683aed0bf09bb68b0d7c9430 (diff)
downloadtext.love-3ffc2ed8f32237969fb202f89200df01e7fbdbc8.tar.gz
bugfix
To reproduce:
  click to position cursor at end of a line
  hit enter
  press any key

before:
  newline got erased and key got added to previous line

now:
  newline is preserved

The new test checks a generalization of this.
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/text.lua b/text.lua
index 80cefaa..f7f2e80 100644
--- a/text.lua
+++ b/text.lua
@@ -164,7 +164,7 @@ end
 
 -- Don't handle any keys here that would trigger love.textinput above.
 function Text.keychord_pressed(chord)
---?   print('chord')
+--?   print('chord', chord, Selection1.line, Selection1.pos)
   --== shortcuts that mutate text
   if chord == 'return' then
     local before_line = Cursor1.line