aboutsummaryrefslogtreecommitdiff
path: root/test/test.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-06-28 00:15:04 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2020-06-28 00:15:04 -0400
commit8e30adbb7886b61a680d0d01bdd50c29a015ee79 (patch)
tree47dbf1d9c96379c931215175c01480097ff448ca /test/test.lua
parenta96fa9e5c2f255a938bd15373344a16448b255c7 (diff)
downloadtextadept-8e30adbb7886b61a680d0d01bdd50c29a015ee79.tar.gz
textadept-8e30adbb7886b61a680d0d01bdd50c29a015ee79.zip
Changed keybinding modifier keys.
They had always been a bit counter-intuitive.
Diffstat (limited to 'test/test.lua')
-rw-r--r--test/test.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test.lua b/test/test.lua
index 4121c8ca..08881604 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -554,14 +554,14 @@ function test_file_io_quick_open_interactive()
end
function test_keys_keychain()
- local ca = keys.ca
+ local ctrl_a = keys['ctrl+a']
local foo = false
- keys.ca = {a = function() foo = true end}
+ keys['ctrl+a'] = {a = function() foo = true end}
events.emit(events.KEYPRESS, string.byte('a'))
assert(not foo, 'foo set outside keychain')
events.emit(events.KEYPRESS, string.byte('a'), false, true)
assert_equal(#keys.keychain, 1)
- --assert_equal(keys.keychain[1], 'ca')
+ assert_equal(keys.keychain[1], 'ctrl+a')
events.emit(events.KEYPRESS, not CURSES and 0xFF1B or 7) -- esc
assert_equal(#keys.keychain, 0, 'keychain not canceled')
events.emit(events.KEYPRESS, string.byte('a'))
@@ -569,7 +569,7 @@ function test_keys_keychain()
events.emit(events.KEYPRESS, string.byte('a'), false, true)
events.emit(events.KEYPRESS, string.byte('a'))
assert(foo, 'foo not set')
- keys.ca = ca -- restore
+ keys['ctrl+a'] = ctrl_a -- restore
end
function test_keys_propagation()