Skip to content

Commit

Permalink
patch(#104): fixes text selection for marked-up diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Peabody committed Jan 3, 2020
1 parent 5947f1b commit 0618978
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mergely",
"version": "4.0.13",
"version": "4.0.14",
"description": "A javascript UI for diff/merge",
"directories": {
"doc": "doc",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/mergely.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
11 changes: 10 additions & 1 deletion src/mergely.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() { },
Expand Down Expand Up @@ -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')
}
);

0 comments on commit 0618978

Please sign in to comment.