diff options
author | 2020-05-24 15:06:48 -0400 | |
---|---|---|
committer | 2020-05-24 15:06:48 -0400 | |
commit | 426e323063217b4395dd1871392d3df13c30ed4f (patch) | |
tree | 4ae97748af4f5acb5e2570fbb971a15c10a7fc68 /modules/textadept | |
parent | 8fcdf4cd321dc928c35482e683072798882a0eef (diff) | |
download | textadept-426e323063217b4395dd1871392d3df13c30ed4f.tar.gz textadept-426e323063217b4395dd1871392d3df13c30ed4f.zip |
Updated tests for recent command entry history change.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/command_entry.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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') |