From 426e323063217b4395dd1871392d3df13c30ed4f Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 24 May 2020 15:06:48 -0400 Subject: Updated tests for recent command entry history change. --- modules/textadept/command_entry.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index c2b6d7f6..86f65ba5 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -207,7 +207,7 @@ function M.run(f, keys, lexer, height) if not f then return end local mode_history = history[history.mode] mode_history[#mode_history + 1] = M:get_text() - mode_history.pos = #mode_history + 1 + mode_history.pos = #mode_history f(M:get_text()) end end @@ -215,7 +215,7 @@ function M.run(f, keys, lexer, height) if f and not history[f] then history[f] = {pos = 0} end history.mode = f local mode_history = history[history.mode] - M:set_text(mode_history and mode_history[#mode_history] or '') + M:set_text(mode_history and mode_history[mode_history.pos] or '') M:select_all() M.focus() M:set_lexer(lexer or 'text') -- cgit v1.2.3