Skip to content

Commit ee08755

Browse files
committed
feat: make signature-help text selectable and copyable
1 parent 14bfebd commit ee08755

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/signature-help-manager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
const { CompositeDisposable, Disposable, Range, Point, TextEditor } = require("atom")
66
import { ProviderRegistry } from "atom-ide-base/commons-atom/ProviderRegistry"
77
import { ViewContainer } from "atom-ide-base/commons-ui/float-pane/ViewContainer"
8+
import { makeOverlaySelectable, makeOverLayCopyable } from "atom-ide-base/commons-ui/float-pane/selectable-overlay"
89

910
module.exports = class SignatureHelpManager {
1011
constructor() {
@@ -294,6 +295,9 @@ module.exports = class SignatureHelpManager {
294295
invalidate: "overlap", // TODO It was never. Shouldn't be surround?
295296
})
296297

298+
makeOverlaySelectable(editor, view.element)
299+
makeOverLayCopyable(view.element)
300+
297301
const marker = editor.decorateMarker(overlayMarker, {
298302
type: "overlay",
299303
class: "signature-overlay",

styles/atom-ide-signature-help.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
margin-top: -2px; // Compensate for shadow
1111
position: relative;
1212
white-space: nowrap;
13+
14+
user-select: text;
1315
pointer-events: all;
16+
1417
display: block;
15-
visibility: hidden;
18+
visibility: hidden; // controlled by js
1619

1720
padding: 5px 5px 2px 5px;
1821

0 commit comments

Comments
 (0)