Skip to content

Commit

Permalink
feat: shift-click to unselect
Browse files Browse the repository at this point in the history
  • Loading branch information
Vtec234 committed May 23, 2024
1 parent 75f511f commit d78023b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lean4-infoview/src/infoview/info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,14 @@ const InfoDisplayContent = React.memo((props: InfoDisplayContentProps) => {

/* Adding {' '} to manage string literals properly: https://reactjs.org/docs/jsx-in-depth.html#string-literals-1 */
return (
<>
<span
onClick={e => {
if (e.shiftKey) setSelectedLocs([])
}}
onPointerDown={e => {
if (e.shiftKey) e.preventDefault()
}}
>
{hasError && (
<div className="error" key="errors">
Error updating: {error}.
Expand Down Expand Up @@ -243,7 +250,7 @@ const InfoDisplayContent = React.memo((props: InfoDisplayContentProps) => {
) : (
'No info found.'
))}
</>
</span>
)
})

Expand Down

0 comments on commit d78023b

Please sign in to comment.