1
0
mirror of synced 2025-12-08 23:08:11 +08:00

patch(#104): fixes text selection for marked-up diff

This commit is contained in:
Jamie Peabody
2020-01-03 22:33:30 +00:00
parent 5947f1b313
commit 06189782de
5 changed files with 17 additions and 3 deletions

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
registry=https://registry.npmjs.org

View File

@@ -1,5 +1,8 @@
# Changes
## 4.0.14
* patch: fixes issue #104 where diff text conflicted with selected text
## 4.0.13
* patch: fixed issue where `lhs_cmsettings` and `lhs_cmsettings` were ignored
* patch: updated documentation

View File

@@ -1,6 +1,6 @@
{
"name": "mergely",
"version": "4.0.13",
"version": "4.0.14",
"description": "A javascript UI for diff/merge",
"directories": {
"doc": "doc",
@@ -40,7 +40,7 @@
"babel-loader": "^8.0.4",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"chai": "^4.1.2",
"codemirror": "^5.32.0",
"codemirror": "^5.50.2",
"copy-webpack-plugin": "^4.6.0",
"css-loader": "^0.28.11",
"file-loader": "^1.1.5",

View File

@@ -48,3 +48,4 @@
.mergely.current.CodeMirror-linenumber { color: #F9F9F9; font-weight: bold; background-color: #777; }
.CodeMirror-linenumber { cursor: pointer; }
.CodeMirror-code { color: #717171; }
span.CodeMirror-selectedtext { background: none !important; }

View File

@@ -395,6 +395,9 @@ jQuery.extend(Mgly.CodeMirrorDiffView.prototype, {
license: '',
width: 'auto',
height: 'auto',
cmsettings: {
styleSelectedText: true
},
lhs: function(setValue) { },
rhs: function(setValue) { },
loaded: function() { },
@@ -1763,4 +1766,10 @@ jQuery.pluginMaker = function(plugin) {
// make the mergely widget
jQuery.pluginMaker(Mgly.mergely);
})(require('jquery'), require('CodeMirror'));
})(
require('jquery'),
require('CodeMirror'),
{
markSelection: require('../node_modules/codemirror/addon/selection/mark-selection.js')
}
);