Skip to content

Commit 080d13d

Browse files
committed
fix: allow setting just a mode and highlight
1 parent eebc4f5 commit 080d13d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lua/cursor/cursor.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,12 @@ function M.stringify_form_part(cursor)
181181
end
182182

183183
if cursor.hl then
184+
if #cursor_str > 0 then
185+
cursor_str = cursor_str .. '-'
186+
end
187+
184188
---@diagnostic disable-next-line: param-type-mismatch
185-
return cursor_str .. '-' .. (type(cursor.hl) == 'table' and table.concat(cursor.hl, '/') or cursor.hl)
189+
return cursor_str .. (type(cursor.hl) == 'table' and table.concat(cursor.hl, '/') or cursor.hl)
186190
end
187191

188192
return cursor_str

0 commit comments

Comments
 (0)