Skip to content

Commit

Permalink
Simplify UI module
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeresman01 committed Sep 27, 2024
1 parent ffc47f1 commit 5bd37bf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lua/tmux-switch/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ function M.show_tmux_session_picker(tmux_sessions)
results = tmux_sessions,
}),

sorter = sorters.get_generic_fuzzy_sorter(opts),
sorter = sorters.generic_sorter({}),

attach_mappings = function(_, map)
map("i", "<CR>", function(prompt_bufnr)
local selected_session = action_state.get_selected_entry()
actions.close(prompt_bufnr)
util.switch_to_session(selected_session.value)
attach_mappings = function(prompt_bufnr)
actions.select_default:replace(function()
util.switch_to_session(prompt_bufnr)
end)
return true
end,
Expand Down

0 comments on commit 5bd37bf

Please sign in to comment.