-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugupstreamworkaroundIssue has a work around mentioned in the discussionIssue has a work around mentioned in the discussion
Description
When nvim_buf_get_extmark_by_id is called with a map containing {"details ": true}, it also returns the details object. But nvim-hs is expecting to parse the result as Vector Int64, which isn't true :)
The following snippet crashes nvim-hs:
getExtmarkIntervalById :: Int64 -> Buffer -> Int64 -> Neovim env ()
getExtmarkIntervalById ns b x = do
!z <- fmap V.toList $ nvim_buf_get_extmark_by_id b ns x $ M.singleton "details" $ ObjectBool True
pure ()with the error
ErrorMessage Expected any Integer value, but got ObjectMap (fromList [(ObjectString "end_col", ObjectInt 19) ....)])
A better type here I think would be:
nvim_buf_get_extmark_by_id :: Buffer -> Int64 -> Int64 -> Map Text Object -> forall env. Neovim env (Int64, Maybe (Map Text Object))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugupstreamworkaroundIssue has a work around mentioned in the discussionIssue has a work around mentioned in the discussion