summaryrefslogtreecommitdiff
path: root/editors/atom/files/patch-src_text-editor-component.js
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2020-02-19 20:02:31 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2020-02-19 20:02:31 +0000
commit3bd4ee6968e866ad13694693027d8f6a684ca4db (patch)
tree2305e4348491a391ecbcf0e9bb62221589098729 /editors/atom/files/patch-src_text-editor-component.js
parentUpdate webkit2-gtk3 to 2.26.4. (diff)
Add atom 1.44.0, hackable text editor for the 21st century.
Many thanks to the maintainer Hiroki for his very appreciated work on it.
Diffstat (limited to 'editors/atom/files/patch-src_text-editor-component.js')
-rw-r--r--editors/atom/files/patch-src_text-editor-component.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/editors/atom/files/patch-src_text-editor-component.js b/editors/atom/files/patch-src_text-editor-component.js
new file mode 100644
index 000000000000..88091c60e55f
--- /dev/null
+++ b/editors/atom/files/patch-src_text-editor-component.js
@@ -0,0 +1,29 @@
+--- src/text-editor-component.js.orig 2019-10-21 17:33:40 UTC
++++ src/text-editor-component.js
+@@ -1809,7 +1809,7 @@ module.exports = class TextEditorComponent {
+ // the paste event. And since we don't use the `paste` event for any
+ // behavior in Atom, we can no-op the event to eliminate this issue.
+ // See https://github.com/atom/atom/pull/15183#issue-248432413.
+- if (this.getPlatform() === 'linux') event.preventDefault();
++ if (this.getPlatform() === 'linux' || this.getPlatform() === 'freebsd') event.preventDefault();
+ }
+
+ didTextInput(event) {
+@@ -1973,7 +1973,7 @@ module.exports = class TextEditorComponent {
+ // On Linux, pasting happens on middle click. A textInput event with the
+ // contents of the selection clipboard will be dispatched by the browser
+ // automatically on mouseup.
+- if (platform === 'linux' && this.isInputEnabled())
++ if ((platform === 'linux' || platform === 'freebsd') && this.isInputEnabled())
+ model.insertText(clipboard.readText('selection'));
+ return;
+ }
+@@ -2843,7 +2843,7 @@ module.exports = class TextEditorComponent {
+ didChangeSelectionRange() {
+ const { model } = this.props;
+
+- if (this.getPlatform() === 'linux') {
++ if (this.getPlatform() === 'linux' || this.getPlatform() === 'freebsd') {
+ if (this.selectionClipboardImmediateId) {
+ clearImmediate(this.selectionClipboardImmediateId);
+ }