From f6b7e710829962be40236494a175a09224bac7c2 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 13 Oct 2010 21:28:11 -0400 Subject: Think before clearing key command statusbar updates; modules/textadept/keys.lua --- modules/textadept/keys.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/textadept/keys.lua') diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 8cda6fb0..87c82a28 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -625,7 +625,15 @@ local function keypress(code, shift, control, alt) for i = SCOPES_ENABLED and 1 or 2, #order do status = run_key_command(order[i][1] and lexer, order[i][2] and scope) if status > 0 then -- CHAIN or HALT - if status == HALT then clear_key_sequence() end + if status == HALT then + -- Clear the key sequence, but keep any status messages from the key + -- command itself. + keychain = {} + if not (gui.statusbar_text == locale.INVALID or + gui.statusbar_text:find('^'..locale.KEYCHAIN)) then + gui.statusbar_text = '' + end + end return true end success = success or status ~= -1 -- cgit v1.2.3