diff --git a/lua/Trans/core/handler.lua b/lua/Trans/core/handler.lua index e95e3d9..211ddb0 100644 --- a/lua/Trans/core/handler.lua +++ b/lua/Trans/core/handler.lua @@ -57,9 +57,11 @@ end local function expl(c, text) local wrapper = c:text_wrapper() - wrapper('', 'TransTitleRound') + -- wrapper('', 'TransTitleRound') + wrapper('', 'TransTitleRound') wrapper(text, 'TransTitle') - wrapper('', 'TransTitleRound') + -- wrapper('', 'TransTitleRound') + wrapper('', 'TransTitleRound') end local indent = ' ' diff --git a/lua/Trans/core/init.lua b/lua/Trans/core/init.lua index 5f83335..3f80544 100644 --- a/lua/Trans/core/init.lua +++ b/lua/Trans/core/init.lua @@ -27,6 +27,7 @@ local function get_word(method) if method == 'n' then return vim.fn.expand('') elseif method == 'v' then + vim.api.nvim_input('') return get_select() elseif method == 'input' then -- TODO Use Telescope with fuzzy finder diff --git a/lua/Trans/core/window.lua b/lua/Trans/core/window.lua index ae0de80..ebd2a86 100644 --- a/lua/Trans/core/window.lua +++ b/lua/Trans/core/window.lua @@ -26,7 +26,9 @@ function M.init(view) border = conf.window.border, title = { { '', 'TransTitleRound' }, + -- { '', 'TransTitleRound' }, { conf.icon.title .. ' Trans', 'TransTitle' }, + -- { '', 'TransTitleRound' }, { '', 'TransTitleRound' }, }, title_pos = 'center', @@ -122,17 +124,18 @@ M.close = function() -- Wait animation done vim.defer_fn(function () api.nvim_win_close(M.id, true) - end, 10) + end, 15) end end - vim.defer_fn(narrow, 10) + narrow() else api.nvim_win_close(M.id, true) end end end + M.show = function() M.init(M.view or 'float') M.load_opts()