Skip to content

Commit

Permalink
fix: correctly parse toggleterm executable names
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Aug 15, 2024
1 parent 8c6f789 commit 518e9b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lua/cord.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,13 @@ local function update_presence(config)
or nil

if current_presence.type == 'toggleterm' then
local type = current_presence.name:match ':(.-);#toggleterm'
local type = current_presence.name:match ':?%s-([^:]-)%s-&?::toggleterm'
or current_presence.name:match ':?%s-([^:]-)%s-&?#;toggleterm'

current_presence.name = type or current_presence.name
current_presence.type = type or current_presence.type
if type ~= nil and type ~= '' then
current_presence.name = type
current_presence.type = type
end
end

local icon, name =
Expand Down

0 comments on commit 518e9b8

Please sign in to comment.