Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd09b9761d | ||
|
|
b3f417e9af | ||
|
|
827c9ed8ef | ||
|
|
06189782de |
@@ -1,5 +1,11 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## 4.0.15
|
||||||
|
* patch: removed unnecessary addon mark-selected
|
||||||
|
|
||||||
|
## 4.0.14
|
||||||
|
* patch: fixes issue #104 where diff text conflicted with selected text
|
||||||
|
|
||||||
## 4.0.13
|
## 4.0.13
|
||||||
* patch: fixed issue where `lhs_cmsettings` and `lhs_cmsettings` were ignored
|
* patch: fixed issue where `lhs_cmsettings` and `lhs_cmsettings` were ignored
|
||||||
* patch: updated documentation
|
* patch: updated documentation
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
require('codemirror/addon/selection/mark-selection.js');
|
||||||
require('codemirror/lib/codemirror.css');
|
require('codemirror/lib/codemirror.css');
|
||||||
require('../src/mergely.css');
|
require('../src/mergely.css');
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "4.0.13",
|
"version": "4.0.16",
|
||||||
"description": "A javascript UI for diff/merge",
|
"description": "A javascript UI for diff/merge",
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "doc",
|
"doc": "doc",
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"babel-loader": "^8.0.4",
|
"babel-loader": "^8.0.4",
|
||||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"codemirror": "^5.32.0",
|
"codemirror": "^5.50.2",
|
||||||
"copy-webpack-plugin": "^4.6.0",
|
"copy-webpack-plugin": "^4.6.0",
|
||||||
"css-loader": "^0.28.11",
|
"css-loader": "^0.28.11",
|
||||||
"file-loader": "^1.1.5",
|
"file-loader": "^1.1.5",
|
||||||
|
|||||||
@@ -48,3 +48,4 @@
|
|||||||
.mergely.current.CodeMirror-linenumber { color: #F9F9F9; font-weight: bold; background-color: #777; }
|
.mergely.current.CodeMirror-linenumber { color: #F9F9F9; font-weight: bold; background-color: #777; }
|
||||||
.CodeMirror-linenumber { cursor: pointer; }
|
.CodeMirror-linenumber { cursor: pointer; }
|
||||||
.CodeMirror-code { color: #717171; }
|
.CodeMirror-code { color: #717171; }
|
||||||
|
span.CodeMirror-selectedtext { background: none !important; }
|
||||||
|
|||||||
@@ -395,6 +395,9 @@ jQuery.extend(Mgly.CodeMirrorDiffView.prototype, {
|
|||||||
license: '',
|
license: '',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
|
cmsettings: {
|
||||||
|
styleSelectedText: true
|
||||||
|
},
|
||||||
lhs: function(setValue) { },
|
lhs: function(setValue) { },
|
||||||
rhs: function(setValue) { },
|
rhs: function(setValue) { },
|
||||||
loaded: function() { },
|
loaded: function() { },
|
||||||
@@ -1354,17 +1357,17 @@ jQuery.extend(Mgly.CodeMirrorDiffView.prototype, {
|
|||||||
}
|
}
|
||||||
else if (change['op'] == 'c') {
|
else if (change['op'] == 'c') {
|
||||||
// apply LCS changes to each line
|
// apply LCS changes to each line
|
||||||
for (j = llf, k = rlf, p = 0;
|
for (j = llf, k = rlf;
|
||||||
((j >= 0) && (j <= llt)) || ((k >= 0) && (k <= rlt));
|
((j >= 0) && (j <= llt)) || ((k >= 0) && (k <= rlt));
|
||||||
++j, ++k) {
|
++j, ++k) {
|
||||||
var lhs_line, rhs_line;
|
var lhs_line, rhs_line;
|
||||||
if (k + p > rlt && this._is_change_in_view('lhs', lhsvp, change)) {
|
if (k > rlt) {
|
||||||
// lhs continues past rhs, mark lhs as deleted
|
// lhs continues past rhs, mark lhs as deleted
|
||||||
lhs_line = led.getLine( j );
|
lhs_line = led.getLine( j );
|
||||||
marktext.push([led, {line:j, ch:0}, {line:j, ch:lhs_line.length}, {className: 'mergely ch d lhs'}]);
|
marktext.push([led, {line:j, ch:0}, {line:j, ch:lhs_line.length}, {className: 'mergely ch d lhs'}]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (j + p > llt && this._is_change_in_view('rhs', rhsvp, change)) {
|
if (j > llt) {
|
||||||
// rhs continues past lhs, mark rhs as added
|
// rhs continues past lhs, mark rhs as added
|
||||||
rhs_line = red.getLine( k );
|
rhs_line = red.getLine( k );
|
||||||
marktext.push([red, {line:k, ch:0}, {line:k, ch:rhs_line.length}, {className: 'mergely ch a rhs'}]);
|
marktext.push([red, {line:k, ch:0}, {line:k, ch:rhs_line.length}, {className: 'mergely ch a rhs'}]);
|
||||||
|
|||||||
Reference in New Issue
Block a user